# addChild... and then addressing the nested clip?

**URL:** <https://forum.kirupa.com/t/addchild-and-then-addressing-the-nested-clip/313766>\
**Category:** flash\
**Created:** [September 9, 2010, 6:30am UTC](https://forum.kirupa.com/t/addchild-and-then-addressing-the-nested-clip/313766 "2010-09-09T06:30:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![brianjs\_04](https://avatars.discourse-cdn.com/v4/letter/b/2bfe46/32.png) [@brianjs\_04](https://forum.kirupa.com/u/brianjs_04)\
**Post date:** [September 9, 2010, 6:30am UTC](https://forum.kirupa.com/t/addchild-and-then-addressing-the-nested-clip/313766/1 "2010-09-09T06:30:29Z")

</div>

I’m successfully adding an external .swf file using the following code:

```auto
import flash.display.Loader;
import flash.net.URLRequest;
var request:URLRequest=new URLRequest("graphic.swf");
var myLoader:Loader = new Loader();
myLoader.load(request);
topClip.addChild(myLoader);

```

So - I’m loading the “graphic.swf” into a movie clip called “topClip” which is already on the stage in the main timeline. That works fine.

But… then I’m having a problem addressing the loaded “graphic.swf” with a button (to lower it’s alpha). I’m using this:

```auto

btn_exit.addEventListener(MouseEvent.CLICK, lower);
function lower(e:Event):void{    
    topClip.myLoader.alpha=.2;    
}

```

So - something must be wrong with my syntax to address the clip “topClip.myLoader.alpha”… Perhaps I need to cast it somehow? Not sure.

Any help would be appreciated.

Thanks,

- Brian
