# .name property problem

**URL:** <https://forum.kirupa.com/t/name-property-problem/286678>\
**Category:** flash\
**Created:** [April 19, 2009, 2:03am UTC](https://forum.kirupa.com/t/name-property-problem/286678 "2009-04-19T02:03:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![xPINKMERCEDESx](https://avatars.discourse-cdn.com/v4/letter/x/73ab20/32.png) [@xPINKMERCEDESx](https://forum.kirupa.com/u/xPINKMERCEDESx)\
**Post date:** [April 19, 2009, 2:03am UTC](https://forum.kirupa.com/t/name-property-problem/286678/1 "2009-04-19T02:03:33Z")

</div>

Hello everyone…is there any known bugs with the .name property?

Check out my problem… I created a movieclip and added it to the stage via addchild. Here’s the code:

var myChoice:choice=new choice();  
myChoice.x=100.0;  
myChoice.y=100.0;  
myChoice.name=“extravagant”;  
addChild(myChoice);  
trace(myChoice.name);

the trace statement shows that myChoice name is in fact “extravagant”. So is “extravagant” my instance name? I don’t know, because when I try to use extravagant as the instance name for a button the compiler says extravagant is undefined.

Here’s the complete code…

var myChoice:choice=new choice();  
myChoice.x=100.0;  
myChoice.y=100.0;  
myChoice.name=“extravagant”;  
addChild(myChoice);  
trace(myChoice.name);

extravagant.addEventListener(MouseEvent.CLICK,moveSafe,false,0,true);

function moveSafe(event:MouseEvent):void  
{  
trace(“name change successful”);

}

when I test movie, I’m getting this error:

1120: Access of undefined property extravagant.

Is this is a bug or it’s me? as 3 is so strict and strange at times…jesus christ help me…

thanks…

x lisa x
