Loading random external swf - with multiple instaces

Hi there

I was wondering if there was a way to modify the current tutorial regarding “loading random movie clips from external swfs”, into MC containers on the stage ?

I would like it to do the following


  • Have mulitple instances running without having to set up lots of MC Containers with different names for each one. Each of them loading randomly (not all the same at once)
  • Once one external swf finishes the next one starts
  • Keep the randomness

The current script looks like this…

filename = [“tubetest.swf”, “tubetest2.swf”, “tubetest3.swf”];
i = filename.length;
k = Math.floor(Math.random()*i);
loadMovie(filename[k], movieTarget4);

This one plays one of the SWF’s and then stops until you hit refresh on the browser and it will load the next.
I would like flash to do this itself - as soon as the last movie plays, the next one starts… Is this impossible or is anyone up for the challenge ?

Thanks a million !

Johnnybaby