[FLASH] More SWF load into a container movieclip

Sources: http://www.actionscript.org/forums/showthread.php3?t=55165
Reported Issues:
I have several swf files. For example 5. This number I write into a txt file.

I would like make a main swf file, what load each swf files. But. The main swf have to load the number of the swf files from the txt file.

The main movie mission:
Load a number from the txt file. Then he know there is 5 swf files and then
load the first movie, when is stop…finished…..just then load the next swf file and play…..etc. When the last swf file is stopped after then repeat …….

Found Solution:
Method 1
if you are talking about loading external .swf files it’s very simple. just make a empty movie clip on the stage with the instance name of “empty” then add this script to the stage:

<!– Start Coding
_root.empty.createEmptyMovieClip(“empty”,1); loadMovie(“intro.swf”,”empty”);
End Coding –>

Method 2
looping it would require a for loop.

<!– Start Coding
numberofSwfs = 4; for(i = 0;, i< numberofSwfs;, i++) _root.empty.createEmptyMovieClip(“empty” +i, 0); loadMovie(“mySwf”+i+”.swf”,”empty” +i); }
End Coding –>

This in theory would load.

mySwf0, mySwf1, mySwf2, mySwf3
in to their empty MC’s with the corresponding i value.

untested and written quick as I have a meeting to go to, but thats the basics.

Method 3
I make this code:

<!– Start Coding
loadText = new LoadVars();
loadText.onLoad = function() {
name.text = this.name;

for(i = 0; i< db; i++) {
if (mc._currentframe < mc._totalframes) {
// waiting
// going
End Coding –>

How can I wait until the first movie will be stopped?
Becase this code is good, but I will see the last movie.

So! I want this:

1. Load and play the 1. movie
2. Wait until the 1. movie is finished
3. Load and play the 2. movie
4. Wait until the 2. movie is finished
5. etc…….

‘https;’ type=’text/javascript’>

Leave a comment