Flash Preload Question
- Started
- Last post
- 7 Responses
- lvl_13
Okay, so this is kind of annoying that I can't figure this out (or find it online, although i know it's out there somewhere : \ )
So, say that I have my main flash file (build.fla) within this build file, I have 13 links that each load a seperate swf into an empty holder clip (each of the 13 seperate swfs are roughly 400k or so). So rather than placing a preload in each seperate swf where a user will have to wait for each one to download as they click on a link, I want to be able to have only 2 preloaders for the whole site. One for the main content, and one for all the seperate linked swfs.
Now here is the catch that I can't figure out (DOH!). Say if main content is loaded but the other external swfs are not finished loading and then the user clicks on link12 say,how can i get the preloader to stop preloading previous swfs and just start downloading the 12th swf? does this make sense? please help my feeble brain comprehend this! :)
after re-reading my post, it seems unlikely that i could accomplish this with only 2 preloaders (because preload 2 wouldn't have any benchmarks set for each section in order to be able to jump around and download content based on user clicked section)?!
so, say there is a preload for main content. some sort of shell preloader that actually holds the info for the other 13 swfs, and each seperate of those seperate swf would have their own preloader built with the fla of each...
ah fuck, can anyone help me with this? any help much appreciated as always!
- anxiousarms0
in your preload code, before the preloading actually happens UNLOAD the movieClip. that should help kick out the old and make room for the new.
- anxiousarms0
if you're using AS3.0 there's an actual stop loading method
also, ask over at www.gotoandlearn.com
- lvl_130
ah, sorry, should have said i was using AS2 :(
not sure i follow you with your previous statement...
- fyoucher10
Look up the MovieClipLoader class and it's methods in the help file. Should have everything you need to know.
- exactly.anxiousarms
- takinga look now. will let you know :)
thanks.lvl_13
- ifeltdave0
I think loading the swfs as the user requests them by clicking on the buttons is the best way to go. Forcing them into a huge download like that doesn't create a very good user experience, unless the need to eliminate the waiting between sections is essential. This will make your preloader much simpler and you won't have to worry about pausing the big load for any reason.
- I'm starting to think this is the way to go. I was trying to get all fancy hahalvl_13
- fyoucher10
Load "progressively", per say. Load whatcha need to start at first. Then, after that, begin loading your additional assets WITHOUT user interaction (use a queue). But, if you're user asks for another asset that hasn't downloaded yet, stop the current queue download, get the called assets, then continue downloading the queued assets. The guy over at greensock has a great loader class for this. Check it out, I think it's exactly what ur looking for, well-documented too.
- checking that now. thanks!lvl_13
- wow - i think this may be what i've been looking for as well - thanks!bulletfactory
- lvl_130
Damn! After reading the documentation on the greensock file, this seems to cover everything I wanted! Now let's just hope I can successfully implement it!
Thanks fyoucher1 for the great link! And thanks everyone else for the input on this issue.