# addChild and instance name

**URL:** https://forum.kirupa.com/t/addchild-and-instance-name/273560
**Category:** flash
**Created:** [October 16, 2008, 10:08pm UTC](https://forum.kirupa.com/t/addchild-and-instance-name/273560 "2008-10-16T22:08:09Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![grinfax](https://avatars.discourse-cdn.com/v4/letter/g/ee59a6/32.png) [@grinfax](https://forum.kirupa.com/u/grinfax)
#### Post date: [October 16, 2008, 10:08pm UTC](https://forum.kirupa.com/t/addchild-and-instance-name/273560/1 "2008-10-16T22:08:09Z")

</div>

Hi,  
I am trying to dynamically add a child to stage, this works. Then I try to access it using the instance name and I can’t. Why can’t I do this?

```auto

intro_btn.addEventListener(MouseEvent.CLICK, goIntro);

function goIntro(EVENT){
    var intro:MovieClip;
    intro = new Intro();
    intro.name = "scr";
    targetX_mc.addChild(intro);
    targetX_mc.scr.sb.init(targetX_mc.scr.txt_mc, "easeOutBack",2,true,2);
}

```

Thank you,  
Kim
