Forum Moderators: open

Message Too Old, No Replies

Flash MX preloader

Preloader keeps playing after movie loaded

         

mrnoisy

12:45 am on Jun 9, 2003 (gmt 0)

10+ Year Member



I've dabbled in Flash before, but now I have a professional animation to do so I need to do some catching up.
I managed to set up a 20 frame preloader scene which loops until the main scene has loaded, then plays the main scene and stops. No problem there.
But when the user returns to or refreshes the HTML page, the 20 frame preloader plays once before the main scene even though the main scene is loaded. I don't want this to happen.
Also is there a way to have the animation not play on a refresh or revisit, just sit on the last frame if it has been played before.

Thanks.

SlowMove

12:53 am on Jun 9, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I had a lot of problems with those preloaders. Did you try putting it in a separate Scene?

SlowMove

12:59 am on Jun 9, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Heres the 1st scene code that worked for me:

if (_framesloaded>=_totalframes) {
gotoAndPlay("Main",1);
} else {
gotoAndPlay("PreLoad",1);
}

mrnoisy

1:05 am on Jun 9, 2003 (gmt 0)

10+ Year Member



Thanks SlowMove, that's the exact same code I used. We must surf the same places :^)
Does your preload play through one cycle when the page is refreshed?

SlowMove

1:12 am on Jun 9, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If the code is in the first frame of the preloader, I don't know why that would happen. Maybe someone more knowledgable has some other ideas.