addChild and loadMovie help please
K,
I am switching to AS3 and I need some help understanding something.
I normally like to have an empty MC that I load external swf files into when I am working on a project.
In AS2 I would do it like this.
myButton.onRelease = function(){
myemptyMC.loadMovie("myswf.swf");
}
Now the cool thing about that was if I loaded a different swf file into the empty movieclip it would just replace the swf that was loaded in before it.
No in as the to load a swf I have to create a new loader and URLRequest. I totally understand how to do that. My problem is that using addChild() does not replace the swf that is already loaded into the empty MC it just places another instance of the new swf file that is being loaded in on top of the swf file that is there.
so if I do myemptyMC.addChild(mySwfLoader); does not replace the content of that movieclip.
How do I do that or how do I remove the content of the movieclip in order to load in my new swf file?
thank