View Full Version : preloader does'nt work -> 1 frame is crammed with data

02 February 2004, 03:49 PM

just integrated a preloader into my current swf. code is ok, but the frames of the preloader scene don't load until the main scene has loaded. While testing I noticed the streaming window which displayed 80% of the whole swf loaded in the first frame, due to my rather big library content. Now the question. How can I make FlashMX load the preloader frames first, or alternatively, how can I shift the symbol loading into the later frames?

Thank you for your help

03 March 2004, 07:51 PM
Try breaking your swf into smaller movies and load them seperately ahead of the movie or move your preloader to it's own scene ahead of the rest.

03 March 2004, 10:41 AM

a bit of code might help us out..

anyway have you tried to merge in the updateAfterEvent(); model and the setInterval(); ?

the updateAfterEvent(); is so that your event gets the first read then the execution.

the setInterval(mc, time, mcinput); makes sure while preloading to check the loaded data ever amount of "time" you put there in milliseconds!

so if you put 100 it's every 100 milliseconds he checks the preloader on how much is loaded.


03 March 2004, 04:54 PM

didn't expect an answer anymore. However, I solved the problem last weekend.

It was indeed the missing setInterval function.


Putting the preloader to it's own frame doesn't work, reason is the library(symbols). Those are ALWAYS loaded in the first frame, regardless of scene structure. So this solution is definitely not serving it's purpose since the preloader is not loaded before the rest of the swf is.

Breaking the whole thing into smaller swfs would work and is a rather often used approach. But in my case it wouldn't make sense, if you'd like to know why see:

Galo: I already mentioned setInterval did the job. Thanks.

Same goes to Clockwork for taking the time to think and answer.

03 March 2004, 09:04 PM
just for other peoples reference, the library is not all loaded in the first frame.

If you have library assets that are set for runtime sharing then they are set by default to be in the first frame, but you can uncheck this option in the linkage dialog box.

obviously though, if everything is on the first frame then they will all load in the first frame, but this is just bad scene contstruction practice.

03 March 2004, 03:20 PM

sorry if I messed up anyone's business with my fault, thanks poe

03 March 2004, 01:03 AM
Most of the time, to preload a website such as yours, I wouldn't even bother with the percentage. Even on a 56K machine, most flash websites are loaded within seconds. I usually create an extra scene (preloader,) and make a simple looping animation indicating that the website is being downloaded. In the first frame I put...

ifFrameLoaded ("MAIN SCENE", n) {
gotoAndPlay("preloader", "Over and Out");

where n is the last frame in the MAIN SCENE, and Over and Out is the frame of this scene where you could make "transition" animation from preloader to MAIN SCENE.

The last frame of the looping animation should of course point back to the first frame...

gotoAndPlay("First frame");

There is tons of ways to make preloaders, though I think this is the quickest to make... I spend the least amount of time on preloaders :-)

CGTalk Moderation
01 January 2006, 01:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.