|
-
Preloader help
Can Anyone help me with this??? I want my preloader to play without having to click view and simulate download. What do I need to change/add????
stop();
this.loaderInfo.addEventListener(ProgressEvent.PRO GRESS, onLoading);
this.loaderInfo.addEventListener(Event.COMPLETE, onComplete);
function onLoading(evt:ProgressEvent):void {
var loaded:Number = evt.bytesLoaded / evt.bytesTotal;
percent_txt.text = (loaded*100).toFixed(0) + "%";
bar.scaleX = loaded
};
function onComplete(event:Event):void {
this.loaderInfo.removeEventListener(ProgressEvent. PROGRESS, onLoading);
this.loaderInfo.removeEventListener(Event.COMPLETE , onComplete);
gotoAndStop(2);
};
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|