FORUMS: list search recent posts

No looping once preloader was added?

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Adam Clark
No looping once preloader was added?
on Feb 23, 2010 at 6:17:33 am

So I have a looping SWF file that I uploaded on my website. It played perfectly until I decided to add a preloader.

I set up the Flash file with 2 Scenes, "Preloader" and "Scene 1" .The Preloader scene will play just fine. After the preloader plays, Scene 1 then begins to play as it should. However, once the animation ends, instead of looping like it did before, it just stops on the first frame.

How can I get my SWF to play the Preloader, and then continue looping the main animation (Scene 1)?

Here is my AS:

function update(e:ProgressEvent):void
var percent:Number = Math.floor( (e.bytesLoaded*100)/e.bytesTotal );
if(preloaderMC is MovieClip){
if(percent == 100){
loaderInfo.addEventListener(ProgressEvent.PROGRESS, update);

// Extra test for IE
var percent:Number = Math.floor( (this.loaderInfo.bytesLoaded*100)/this.loaderInfo.bytesTotal );
if(percent == 100){

Return to posts index

Adam Clark
Re: No looping once preloader was added?
on Feb 23, 2010 at 7:35:23 pm

I received a reply on another forum that said to do the following but I am not quite sure how to do this:

"after loading is complete and you return to your first frame, your stop() is executing immediately after your nextFrame(). So flash won't advance frames.

To remedy, use a boolean to determine if that frame has played once and if yes, don't execute that stop()."

Any help is appreciated!

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved