flash as3.0 加载条制作
stop();
import flash.display.LoaderInfo;
import flash.events.ProgressEvent;
import flash.text.TextField;
var loadText:TextField=new TextField();
loadText.x=220;
loadText.y=200;
addChild(loadText);
myload.addEventListener(Event.ENTER_FRAME,onEnterFramee);
function onEnterFramee (event:Event) {
if (framesLoaded==totalFrames) {
trace(1);
myload.removeEventListener(Event.ENTER_FRAME,onEnterFramee);
nextFrame();
}
else {
var percent:Number=root.loaderInfo.bytesLoaded/root.loaderInfo.bytesTotal;
var m:Number=Math.round(percent*100);
myload.gotoAndStop(m);
loadText.text=m+"%";
}
} //myload为场景中预设的loading动画的MC名字