# Output array number on release

**URL:** <https://forum.kirupa.com/t/output-array-number-on-release/225356>\
**Category:** Uncategorized\
**Created:** [May 10, 2007, 11:07pm UTC](https://forum.kirupa.com/t/output-array-number-on-release/225356 "2007-05-10T23:07:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![iwiniquit](https://avatars.discourse-cdn.com/v4/letter/i/7993a0/32.png) [@iwiniquit](https://forum.kirupa.com/u/iwiniquit)\
**Post date:** [May 10, 2007, 11:07pm UTC](https://forum.kirupa.com/t/output-array-number-on-release/225356/1 "2007-05-10T23:07:52Z")

</div>

i have a set of buttons outputted by using an array/loop (through xml).

when i click on a button i want to get the array number of the specific item i click on.

here’s my logic:

```auto
 for(i = 0; i < totalList; i++) {
            this.container["item_" + i].bg.onRelease = function () {
                       itemClicked = this*;
                       trace(itemClicked);
            }
}

```

so basically i need to know what i would replace this\* with in order for it to actually output it’s array number.

any help would be greatly appreciated!
