You just need to put this code into ur first frame of flash animation and start the animation on 2nd frame.That's all.
------------------------------------------------------------------------------------
stop();
addEventListener(Event.ENTER_FRAME, loadProgress);
function loadProgress(event:Event):void {
var bytes_loaded:int = this.root.loaderInfo.bytesLoaded;
var bytes_total:int = this.root.loaderInfo.bytesTotal;
var bytes_percent:int = Math.round((bytes_loaded/bytes_total)*100);
per.text = bytes_percent + " %";
trace((bytes_loaded/bytes_total)*100);
if (bytes_loaded >= bytes_total) {
trace("This movie is loaded");
removeEventListener(Event.ENTER_FRAME, loadProgress);
gotoAndPlay(1);
per.text = "";
gotoAndPlay(2)
//where ur animation starts
}
}
No comments:
Post a Comment