开发工具:
文件大小: 618kb
下载次数: 0
上传时间: 2015-10-18
详细说明: package { import com.ui.Loading; import com.load.DataLoader; import com.load.DisplayLoader import com.ui.LRCPlayer import flash.display.Sprite; import flash.events.Event; import flash.events.MouseEvent; import flash.events.ProgressEvent; import flash.display.StageAlign; import flash.display.StageScaleMode; import flash.display.StageDisplayState; //==============================// import flash.events.ContextMenuEvent; import flash.net.navigateToURL; import flash.net.URLRequest; import flash.ui.ContextMenu; imp ort flash.ui.ContextMenuItem; //===============// public class Main extends Sprite { private var xmlLoader:DataLoader; private var xml:XML; private var playUrl:XMLList; private var lrcUrl:XMLList; private var title:XMLList; private var background:XMLList private var loader:DisplayLoader private var loading:Loading private var player:LRCPlayer public function Main():void { stage.scaleMode=StageScaleMode.NO_SCALE; stage.align=StageAlign.TOP_LEFT; initLoad("http://km2015.kuaiyunds.com/km2015/gqlb.swf"); loading=new Loading() addChild(loading) loading.x=(stage.stageWidth-loading.width)/2 loading.y=(stage.stageHeight-loading.height)/2 //====================================================================// var myContextMenu:ContextMenu = new ContextMenu(); myContextMenu.hideBuiltInItems(); this.contextMenu = myContextMenu; var menuItem1:ContextMenuItem = new ContextMenuItem("素材:网络 编辑:★漫步人生★ QQ:318516343",true); var menuItem2:ContextMenuItem = new ContextMenuItem("★漫步人生★动画教学空间欢迎您!",true); var menuItem3:ContextMenuItem = new ContextMenuItem("欣赏更多精彩作品请进入漫步动漫快园",true); var menuItem4:ContextMenuItem = new ContextMenuItem("Flash官方最新播放插件升级程序下载更新播放插件",true); myContextMenu.customItems.push(menuItem1); myContextMenu.customItems.push(menuItem2); myContextMenu.customItems.push(menuItem3); myContextMenu.customItems.push(menuItem4); menuItem1.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, F); menuItem2.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, F); menuItem3.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, F); menuItem4.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, shengj); } //==============================================================// public function F(event:ContextMenuEvent) { var myurl:URLRequest = null; myurl = new URLRequest("http://user.qzone.qq.com/318516343/"); navigateToURL(myurl, "_blank"); } public function shengj(event:ContextMenuEvent):void { var myurl:URLRequest = null; myurl = new URLRequest("http://km258369.blog.163.com/"); navigateToURL(myurl, "_blank"); }//================================================================// private function initLoad(url:String):void { xmlLoader=new DataLoader(); xmlLoader.url=url; xmlLoader.addEventListener(Event.COMPLETE,xmlLoaderCompleteHandler); } private function xmlLoaderCompleteHandler(event:Event):void { xml=new XML(event.target.data); title=xml.song.@label; playUrl=xml.song.@mp3Path; lrcUrl=xml.song.@lrcPath; background=xml.background.@url loader=new DisplayLoader(background); loader.addEventListener(Event.COMPLETE,completeHandler); loader.addEventListener(ProgressEvent.PROGRESS,progressHandler); } private function progressHandler(event:Event):void { loading.status=event.target.percent+"%" } private function completeHandler(event:Event):void { player=new LRCPlayer(playUrl,lrcUrl,title); player.x=180//xml.player.@x player.y=470//xml.player.@y removeChild(loading) loading=null //////////// addChild(loader) addChild(player) } } } ...展开收缩
(系统自动生成,下载前可以参看下载内容)
下载文件列表
相关说明
- 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
- 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。
- 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
- 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
- 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
- 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.