# Instance name in AS3 when using addChild();

**URL:** <https://forum.kirupa.com/t/instance-name-in-as3-when-using-addchild/297761>\
**Category:** flash\
**Created:** [October 8, 2009, 3:08am UTC](https://forum.kirupa.com/t/instance-name-in-as3-when-using-addchild/297761 "2009-10-08T03:08:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ChaosNY](https://avatars.discourse-cdn.com/v4/letter/c/87869e/32.png) [@ChaosNY](https://forum.kirupa.com/u/ChaosNY)\
**Post date:** [October 8, 2009, 3:08am UTC](https://forum.kirupa.com/t/instance-name-in-as3-when-using-addchild/297761/1 "2009-10-08T03:08:47Z")

</div>

I attached my “menu” movie clip to stage using addChild();. Inside menu there is four buttons, which have instance names but main MovieClip “menu” doesn’t. I have a difficulties to access those buttons using AS3. Could you please help me. this is a code I used: - PLEASE FIX IT/ thx

// Menu animates in:

```
var menu_anim:menu = new menu();
addChild(menu_anim);
new Tween(menu_anim,"alpha",Strong.easeOut,0,1,10,true ); 

```

Now when i try to use

menu\_anim.name = “menu\_mc”;  
var currentPage:MovieClip = menu\_mc.btn\_permanentmakeup\_mc;

… i am getting an error : 1120: Access of undefined property menu\_anim.

Could you please help me hot to access “btn\_permanentmakeup\_mc” movie clip inside “menu” movie clip?
