# Get index of 2d array?

**URL:** <https://forum.kirupa.com/t/get-index-of-2d-array/328421>\
**Category:** Uncategorized\
**Created:** [May 16, 2012, 6:01am UTC](https://forum.kirupa.com/t/get-index-of-2d-array/328421 "2012-05-16T06:01:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![GeekTweak\_0](https://avatars.discourse-cdn.com/v4/letter/g/b5ac83/32.png) [@GeekTweak\_0](https://forum.kirupa.com/u/GeekTweak_0)\
**Post date:** [May 16, 2012, 6:01am UTC](https://forum.kirupa.com/t/get-index-of-2d-array/328421/1 "2012-05-16T06:01:49Z")

</div>

How can i obtain the index of a multidimensional array, preferably the first out of the two? (the 1,2,3. not 0):

```auto
*arrayThing[0][0].addEventListener(MouseEvent.CLICK, trace*Array);
*arrayThing[1][0].addEventListener(MouseEvent.CLICK, trace*Array);
*arrayThing[2][0].addEventListener(MouseEvent.CLICK, trace*Array);

*function traceArray(e:MouseEvent)
{
     trace(How do i obtain either 0,1, or 2, depending on which was clicked?);
}

*

```

thanks.
