import flash.events.Event;
stop();
var _load:Number;
var Percent:Number;
stage.addEventListener(Event.ENTER_FRAME, _loading);
function _loading(e:Event){
_load = stage.loaderInfo.bytesLoaded / stage.loaderInfo.bytesTotal;
Percent = Math.round(_load * 100);
bar.scaleX = _load;
txt_preloader.text = Percent + "%";
if(Percent == 100){
stage.removeEventListener(Event.ENTER_FRAME, _loading);
gotoAndPlay(2);
}
}
Nenhum comentário :
Postar um comentário