Advanced ActionScripters: Dynamically Generated Preloaders with External SWF files

I have a container movie that loads external SWF movies into itself using the “LoadMovieNum” action.

Rather than having multiple preloaders (one for each loaded SWF file) I would like to create one that can be used for all of the SWFs that need to be loaded upon request.

In essence this is what I would like to happen…

In the Parent container movie there are several buttons, each is associated with a different SWF child movie that needs to be loaded into the container movie. When user clicks a button I would like a preloader animation to start, and depending on which button the user chose is which external SWF movie the preloader will chose to load in the background, once the external SWF movie is completely loaded, then the preloader will finish.

It should be noted that the child SWF files have to maintain their ability to be played independently as well – for they will be used in other locations on the website.

I realize this is an extremely tall order; any help would be tremendously appreciated.

jOEL

just curious: why all the effort for this? esp when it is so easy to create a preloader in one swf then just copy the frames that make it up and past it into any swf you have? Just seems like a lot of effort to avoid something that is not very difficult - but maybe I am missing something?
Peace

here’s the project in the rough…

http://qc.accelerateu.org/joel/index.html

i have a movie clip on the main timeline of the container movie (two doors coming together) i want them to stay closed and load the external swf file while they are closed then open onec the movie is completely loaded. as it stands now it chokes on the doors cuz its loading the movie in the background.

i realize i can make duplicate preloaders (doors) and have each one load a different movie…but i thought it would be more efficient if i could only have one preloader (Doors movie clip instance) I guess i could live with this but i need a way to have the doors wait until the entire external movie is loaded until they open up again…basically a preloader for an external SWF using the LoadMovieNum action.

not even sure this would work but…
well in theory

on (release)
load = “movie1.swf”;
loadMovie("doors.swf);
}

then, when the doors close give them a function like

loadMovie("_root.load")

along with the preloading script and maybe I’ll get lucky and be right.

each button would set load = “theirownname.swf” of course, and then that variable could be used to load all those files. This also assumes that the doors are loading from an external swf, although that may not be necessary.

i dont think a movie thats loaded displays until it is fully loaded so the preloader inside it wont do anything. your best bet is loading it into a movie clip and then doing getBytesTotal() and getBytesLoaded() of that movie

Posibly what you can do is have a loading movie which checks if its loaded and then when its loaded it sets the _visible property of the loaded movie to true and the _visible property to false for it self…:rambo: :bandit: