# Can't access MC child of loader

**URL:** <https://forum.kirupa.com/t/cant-access-mc-child-of-loader/305207>\
**Category:** Uncategorized\
**Created:** [February 21, 2010, 1:18pm UTC](https://forum.kirupa.com/t/cant-access-mc-child-of-loader/305207 "2010-02-21T13:18:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![felipegm](https://avatars.discourse-cdn.com/v4/letter/f/e9bcb4/32.png) [@felipegm](https://forum.kirupa.com/u/felipegm)\
**Post date:** [February 21, 2010, 1:18pm UTC](https://forum.kirupa.com/t/cant-access-mc-child-of-loader/305207/1 "2010-02-21T13:18:46Z")

</div>

I’m using the code bellow:

```auto

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!!!
