# How to learn the index number of an array node?

**URL:** <https://forum.kirupa.com/t/how-to-learn-the-index-number-of-an-array-node/253614>\
**Category:** flash\
**Created:** [March 3, 2008, 3:16pm UTC](https://forum.kirupa.com/t/how-to-learn-the-index-number-of-an-array-node/253614 "2008-03-03T15:16:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brother\_Gabriel](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/brother_gabriel/32/3665_2.png) [@Brother\_Gabriel](https://forum.kirupa.com/u/Brother_Gabriel)\
**Post date:** [March 3, 2008, 3:16pm UTC](https://forum.kirupa.com/t/how-to-learn-the-index-number-of-an-array-node/253614/1 "2008-03-03T15:16:57Z")

</div>

Hello all!

This is kind of complicated, I think. I have a multidimensional array:

myArray = newArray()

myArray[0] = new Item(buttonA, “nameA”, ArrayA);  
myArray[1] = new Item(buttonB, “nameB”, ArrayB);  
myArray[2] = new Item(buttonC, “nameC”, ArrayC);  
myArray[3] = new Item(buttonD, “nameD”, ArrayD);

Thus, on the main screen there are 4 buttons (named ButtonA - ButtonD) and a dynamic text which displays a string according to the variable: Screen.

I am trying to make a function so when I onMouseOver one of the buttons, such as ButtonA the function finds out what Array ButtonA belongs to and sends “nameA”, which is also part of myArray[0], to the dynamic text, Screen.

If someone would be so very kind as to help me, I would be very grateful.

* * *

- Brother Gabriel
