I’m using the code bellow:
function Toload():void{
var mcExt:MovieClip;
var ldr:Loader = new Loader();
ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, swfLoaded);
ldr.contentLoaderInfo.addEventListener(Event.INIT,loading);
ldr.load(new URLRequest(fileName+".swf"));
function swfLoaded(e:Event):void {
var mcExt:MovieClip = ldr.content as MovieClip;
ldr.contentLoaderInfo.removeEventListener(Event.COMPLETE, swfLoaded);
container_mc.window_mc.addChild(mcExt);
menu_mc.produtos.addEventListener(MouseEvent.CLICK, clicked);
}
function clicked(e:MouseEvent):void {
mcExt.gotoAndStop("exit");
}
The problem I’m getting and I can’t figure it out in AS3, is how to call the “mcExt” from another function, outside the function where the mc is created.
tried MovieClip(root).container_mc.window_mc.mcExt.gotoAndStop(“exit”); and it does not work.
please, any help will be great!!!