Groups | Blog | Home
all groups > flash actionscript > january 2004 >

flash actionscript : Loading Movie Clips into other movie Clips


jayjayp
1/26/2004 11:49:24 PM
I know I have done this before (or at least something like unto it) but can't find a clear explanation of how to or if it can be done:

I have an empty movie clip(1) on the stage. On release of a button, I want to load and play a different movie clip(2) (not SWF file) within the empty movie clip(1). Assuming the empty MC instance is myEmptyClip, and the MC I want to load upon releasing the button is called, loadedClip, how would I get the loadedClip to play in myEmptyClip?

Does this make sense? It seems really elementary, but I'm having a hard time with the ActionScript.

Thanks!

Jack.
1/27/2004 1:02:03 AM
give the movieclip loadedClip a Linkage identifier in the Library,
and use - movieclip.attachMovie(idName, newName, depth)

btn.onPress = function(){
myEmptyClip.attachMovie("loadedClip","loadedClip",99);
};

regards
AddThis Social Bookmark Button