# Instance names in a array?

**URL:** <https://forum.kirupa.com/t/instance-names-in-a-array/307522>\
**Category:** Uncategorized\
**Created:** [April 5, 2010, 8:27am UTC](https://forum.kirupa.com/t/instance-names-in-a-array/307522 "2010-04-05T08:27:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nim](https://avatars.discourse-cdn.com/v4/letter/n/67e7ee/32.png) [@Nim](https://forum.kirupa.com/u/Nim)\
**Post date:** [April 5, 2010, 8:27am UTC](https://forum.kirupa.com/t/instance-names-in-a-array/307522/1 "2010-04-05T08:27:33Z")

</div>

I have some movieclips on stage each with an instance name like this: 101, 102,103,104… etc

When I click one of them, it’s istance name is added in an array:

```auto
myArray.push(event.currentTarget.name);

```

I’ve got a button on stage too and I want when this button is clicked to change the Y of all the selected movieclips:

```auto
function mybutton_btn(event:MouseEvent):void
{  
   this[myArray*].y = this[myArray*].y+50;
}

```

But this code is wrong.

Output error is:

> TypeError: Error #1010: A term is undefined and has no properties.  
> at tich1\_fla::MainTimeline/mybutton\_btn()

How can I achieve what I want??
