all groups > flash actionscript > september 2005 >
You're in the

flash actionscript

group:

Adding .SWF Files to a Blank MovieClip


Adding .SWF Files to a Blank MovieClip ryanstewart
9/21/2005 9:54:26 PM
flash actionscript: I am creating a blank movie clip in ActionScript using the
createEmptyMovieClip("my_mc", this.getNextHighestDepth()) function, and in that
blank movie clip, I want to add a series of external swf files.

If I use the my_mc.loadMovie("my_swf_url.swf") more than once, it just
overwrites the old swf file I added. Is there any way to import multiple swf
files so that they all show within one movieClip at the same time?

Thanks,

Ryan
Re: Adding .SWF Files to a Blank MovieClip Jon Moyles
9/22/2005 12:00:00 AM
you need to create multiple movieclips within the movieclip you want to
Re: Adding .SWF Files to a Blank MovieClip kamsky
9/22/2005 12:00:00 AM
Re: Adding .SWF Files to a Blank MovieClip nITiNkIlLeRmEeRuT
9/22/2005 8:52:22 AM
a small sample to start with.
This code will load 5 MC's with name a1.swf .... a5.swf
You can set x and y coords in for loops


var totalMovieToLoad:Number = 5;
createEmptyMovieClip("my_mc", this.getNextHighestDepth());
for (var i:Number = 1; i <= totalMovieToLoad; i++) {
my_mc.createEmptyMovieClip(("my_mc" + i), my_mc.getNextHighestDepth());
my_mc["my_mc" + i].loadMovie("a" + i + ".swf");
}
Re: Adding .SWF Files to a Blank MovieClip ryanstewart
9/22/2005 6:33:45 PM
AddThis Social Bookmark Button