Loading multiple SWFs
- Started
- Last post
- 11 Responses
- mbr
I've got a bunch of animations (500kb - 1000kb) and I would like to load them all at once.
Is this going to be a problem? Or can I just load them each into a mc and not worry?Thanks.
- ********0
you can either place them all in one main .SWF or place them individually all over. Or you can use one main root/base file and preload different areas, which is the best I think. ;)
- mbr0
By preload you just mean load swf01 into mc01, swf02 into mc02, etc., correct?
- unfittoprint0
Jaz's right. Load according to user intentions.
You want to load them all at once, check getBytesTotal() and getBytesLoaded() for all of them, check the percentage and when Loaded=Total, make them visitable/visible/clickable.
- mbr0
Ok, thanks.
Here's what my client wants:
Animations 1-10 load simulataneously, but 1 begins to play first, then when it gets done, animation 2 plays, and so forth.
Or more ideally, 2-10 load while 1 is playing.
They will all also be able to be played individually.Make sense? They are animations of a floor plan (for each room).
- unfittoprint0
imagine this:
movie1.swf
movie2.swf
movie3.swf
movie4.swf
....on the main movie.
for(i=0,i 'less' numberMC's, i++){
this.createEmptyMovieClip("movie... i)
}count=1
movie1.loadmovie("movie"+count...
this.onEnterFrame = function(){
if(this["movie"+count].getbytesL... ==
this["movie"+count].getbytesTota...this["movie"+count].play()
++countthis["movie"+count].loadmovie("m...
}
}stop()
- ********0
yeah that will be sweet bro, good luck! ;)
- ********0
whoa, now I might use that AS ;)
- stewart0
so smart. i'm going to use that too. thanks.
- ********0
I need to redo the Movies I made though if I use this, but ohh well it's functionally much better, thanks man!
- mbr0
unfittoprint -
Thanks for posting the code, mighty generous of you. If all goes well, I'll post the final results.
