PDA

View Full Version : Possible to load all external .swf files at once ?


Iron Mike
09-29-2007, 10:22 AM
Hi,

I have a website here in AS2 which has main .swf file and 8 sub .swf files which are loaded into a container depending on which button the user presses...

And I have a couple of question regarding those external sub .swf files: ;)


1. First a general question: when a user loads the main .swf file and then decides to see 2-3 sub sections (loading those external sub swf files) do those sub .swf files remain on his HD while he's looking into a different section of my page or are they loaded every time again ?

2. Is it possible to assign via actionscript to load ALL of those external sub .swf files quietly in the background already, so that when the user presses a button the files are already loaded and ready to go ?

Thanx for your help in advance !!

Mike

atomic
09-29-2007, 02:19 PM
Normally, during that browsing session at least, loaded files would be cached on the user's system, and those cached files would be instantly re-loaded, if they were called upon again, unless you forced a re-load of a fresh file from the server itself.

You can't start the background preloading of any amount of files (stored in an array for example...), as soon as the main shell movie starts playing... Thing is, you will never really know in what order, each user will browse your site... His first choice might be the last file you were preloading, thus it would still need to be preloaded, before he could view it..
Assuming you maybe had an intro.swf (preloaded within the main movie...), that would allow more time to be preloading the other files in the background, then maybe those other files will be readily available, when the user selects any one of them...

Iron Mike
09-29-2007, 02:28 PM
Assuming you maybe had an intro.swf (preloaded within the main movie...), that would allow more time to be preloading the other files in the background, then maybe those other files will be readily available, when the user selects any one of them...

Atomic,

thanx for your answer

Well, I have exactly that and I thought using that time to pre-load other sub .swf files...

So how would I do that ?

How can I assign to pre-load those files ?

Mike

craigr1986
04-09-2009, 10:44 PM
bringing it back from the dead -

i saw this was an old post - but i have exactly the same question.
In as2, i have an index.swf which has several other external swfs that get loaded into it. Only 2 of those swfs are large files. is it possible to preload those 2 swfs so that the viewer has them - should they decide to click on them?

if so - how?
thanks
craig

loadlearn
04-10-2009, 12:30 AM
If you want to be sure they will be available, you can preload those 2 files within your index.swf's preloader, if you have one.
If not, you can start preloading them when the index movie starts playing.

craigr1986
04-10-2009, 04:00 AM
i do have a preloader - where can i find some script to add my two external swfs into it to get them to load up before the movie plays?
thanks
craig

loadlearn
04-10-2009, 04:26 AM
Attach your .fla and those 2 .swfs, or at least post their names, so that I can set it up in the preloader.

kkbbcute
04-10-2009, 05:07 AM
Try googling "loadMovie swf flash", you should get what you want on the first link. ;)

craigr1986
04-10-2009, 02:27 PM
the fla can be downloaded at

http://rapidshare.com/files/219694244/index.fla.html

the external swf's are "photos.swf" and "cc.swf"

its a huge work in progress

thanks
craig

kkbbcute
04-11-2009, 04:29 AM
Okay, this may help you a little bit with the loadMovie stuff:

http://www.cbtcafe.com/flash/loadmovie/loadmovie.html

And this will help you with the preloading:

http://www.senocular.com/flash/tutorials/preloading/

loadlearn
04-14-2009, 01:36 AM
Try this...

http://rapidshare.com/files/221045784/corindex.fla.html