Load swf files in succession

svenghoulie
svenghoulie used Ask the Experts™
on
I want to load 50 swf files in succession with no user interaction, I also want to be able to pause and then play anywhere. I have successfuly loaded the first swf and traced the end of its' timeline.

in the main swf i load a swf file;
in the loaded swfs I am tracing the last frame so that I can continue loading the next swf and so on.

What is the best way to accomplish this?
stop();
 
addEventListener(Event.ENTER_FRAME,myFunction);  
function myFunction(event:Event) {  
trace("scene1 done!");  
}  
 
 
 
and in the main swf:
 
[code]
var request:URLRequest = new URLRequest("scene1.swf");
var loader:Loader = new Loader()
loader.load(request);
addChild(loader);
[/code]

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2009
Commented:
There are two ways to accomplish this, one is simultaneous loading of all 50 swfs at once or 10 by 10 or whatever you like.

These are the two best ways I will recommend you.

The other way is wait for the first swf to load finish, then when Event.COMPLETE is triggered, load another SWF and so on.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial