首页 > 代码库 > swf loading 自身

swf loading 自身

stop();
import flash.net.URLRequest;
import caurina.transitions.Tweener;

loaderInfo.addEventListener(Event.OPEN, thisOpen);
loaderInfo.addEventListener(ProgressEvent.PROGRESS, thisPro);
loaderInfo.addEventListener(Event.COMPLETE,thisCom);


//开始加载
function thisOpen(e){
	loadTxt.text = "0 %";
}

//加载进度
function thisPro(event:ProgressEvent):void{
	loadTxt.text = "" + Math.round(event.bytesLoaded / event.bytesTotal * 100) + " %";
}

//加载完成
function thisCom(event:Event):void
{
	loadTxt.text = "";
	gotoAndStop(2);
}

swf loading 自身