# AS2-Change Instance Name of Array Item

**URL:** <https://forum.kirupa.com/t/as2-change-instance-name-of-array-item/283224>\
**Category:** flash\
**Created:** [March 3, 2009, 9:48pm UTC](https://forum.kirupa.com/t/as2-change-instance-name-of-array-item/283224 "2009-03-03T21:48:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![stanmc](https://avatars.discourse-cdn.com/v4/letter/s/b77776/32.png) [@stanmc](https://forum.kirupa.com/u/stanmc)\
**Post date:** [March 3, 2009, 9:48pm UTC](https://forum.kirupa.com/t/as2-change-instance-name-of-array-item/283224/1 "2009-03-03T21:48:57Z")

</div>

Hello - I think this is easy, but haven’t hit the right solution. Searched forum to no avail.

I have an array of buttons. When an array item is clicked, it executes several lines of code. I want to also amend the item’s instance name so a different set of code can be applied to buttons already clicked.

I’ve tried this and similar and don’t have it right yet:

```auto
navButton*.onRelease = function() {
	this.enabled = false;
	this._name = (this._name + "b"); //add "b" to instance name of this
	pastBtn.enabled = true;
	pastBtn._alpha = 100;
	pastBtn.bSelected = false;
	pastBtn = this;
}

```

Thanks for the help.
