# Selecting an instance for a unique function AS3

**URL:** <https://forum.kirupa.com/t/selecting-an-instance-for-a-unique-function-as3/259150>\
**Category:** flash\
**Created:** [May 1, 2008, 2:40pm UTC](https://forum.kirupa.com/t/selecting-an-instance-for-a-unique-function-as3/259150 "2008-05-01T14:40:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![briman](https://avatars.discourse-cdn.com/v4/letter/b/ee59a6/32.png) [@briman](https://forum.kirupa.com/u/briman)\
**Post date:** [May 1, 2008, 2:40pm UTC](https://forum.kirupa.com/t/selecting-an-instance-for-a-unique-function-as3/259150/1 "2008-05-01T14:40:45Z")

</div>

Hello-  
I have made an interface of buttons by using a 2D array. What I want to do now is have a specific sound play when the user clicks on a particular button.  
var \_bbutton:buttonAnimated;  
var \_bbuttonX:Number = 29;  
var \_bbuttonY:Number = 445;  
var \_bbuttonR:Number = 0;

for (var j:Number = 0;j \<13;j++ ) {  
for (var i:Number = 0; i \< 43; i++)

```
    {_bbutton = new buttonAnimated();
    addChild(_bbutton);
    //add the event listener here
    _bbutton.x = _bbuttonX;
    _bbutton.y = _bbuttonY;
    _bbutton.rotation = _bbuttonR;
    _bbuttonX += 23;}
    
_bbuttonY +=23;
_bbuttonX =29;
}

        
    _bbutton.getChildAt(1);
    buttonMode = true;
    trace (getChildAt(4).name);

```

These last 3 lines returns instance23. So I’d like to be able to manipulate this instance23 specifically. This seems workable, anybody got any ideas?
