# Array position on mouseclick

**URL:** <https://forum.kirupa.com/t/array-position-on-mouseclick/286577>\
**Category:** flash\
**Created:** [April 17, 2009, 8:19am UTC](https://forum.kirupa.com/t/array-position-on-mouseclick/286577 "2009-04-17T08:19:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![RossKidd](https://avatars.discourse-cdn.com/v4/letter/r/53a042/32.png) [@RossKidd](https://forum.kirupa.com/u/RossKidd)\
**Post date:** [April 17, 2009, 8:19am UTC](https://forum.kirupa.com/t/array-position-on-mouseclick/286577/1 "2009-04-17T08:19:05Z")

</div>

I have two arrays thumbs and images, both the thumb and image are added to the same index in their arrays, so thumb[0] is the thumb of image[0]

but what I need to do is get the index position of the clicked item, how do i do this?

new\_carousel\_item.addEventListener(MouseEvent.CLICK, getValue);  
new\_carousel\_item.buttonMode = true;  
thumbs.push(new\_carousel\_item);

```
    public function getValue(evt:MouseEvent):void {
        
      //I cannot determing the index position
        
    }
```
