-
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);
};
-
You can press command+enter twice and second time it will be simulating download.
The reason you can not view the preloader the first time, is because it is loading so fast. There is no need for a preloader if you are playing the file on your local machine. You need to simulate a slower-bandwidth to see a preloader working.
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
|