標題:
flash問題
[打印本頁]
作者:
kenny7069
時間:
2012-8-15 22:09
標題:
flash問題
[Flash cs5]點解load個時得幾點 但系我有做到個loading 預載動畫
PS:我的SWF檔案大約19MB
影格一程式碼:
this.root.loaderInfo.addEventListener(ProgressEvent.PROGRESS, progressHandler);
this.root.loaderInfo.addEventListener(Event.COMPLETE, completeHandler);
// 處理載入進度
function progressHandler (e
rogressEvent):void {
var percent:Number = e.bytesLoaded / e.bytesTotal;
trace (percent);
// 以下二行是可能的顯示狀況
load_mc.gotoAndStop(Math.floor(percent * 100));
loading.text = String(Math.floor(percent * 100))+"%";
}
// 結束載入
function completeHandler (e:Event):void {
this.root.loaderInfo.removeEventListener(ProgressEvent.PROGRESS, progressHandler);
this.root.loaderInfo.removeEventListener(Event.COMPLETE, completeHandler);
play();
}
stop();
歡迎光臨 IPvE vLan 遊戲平台|網吧系統 (https://www.ipve.com/bbs/)
Powered by Discuz! 6.0.0