How to hide or delete movieclip using AS3
I have different layers and different movieclip in the stage and when the movieClip is clicked it load the external movieclip.
here is the code
var swfLoader:Loader;
function swfLoaded(evt:Event):void
{
var myStates:MovieClip = (evt.target.content) as MovieClip;
addChild(myStates);
}
function loadLondon(evt:MouseEvent):void
{
swfLoader = new Loader();
swfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE ,swfLoaded);
swfLoader.load(new URLRequest("london.swf"));
}
london.addEventListener(MouseEvent.CLICK, loadLondon);
Here external SWF is loaded sucessfully fully but all the content remain in back.( I mean i can see the london and other behind the new swf);
how to remove those contents(ie. london );
I mean when i load external swf all the elements in current state must me removed and i can only see the new swf in the stage.
Please Help me