# indexOf() in an array of movieClips

**URL:** <https://forum.kirupa.com/t/indexof-in-an-array-of-movieclips/331652>\
**Category:** flash\
**Created:** [September 18, 2013, 12:42am UTC](https://forum.kirupa.com/t/indexof-in-an-array-of-movieclips/331652 "2013-09-18T00:42:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lio89](https://avatars.discourse-cdn.com/v4/letter/l/74df32/32.png) [@lio89](https://forum.kirupa.com/u/lio89)\
**Post date:** [September 18, 2013, 12:42am UTC](https://forum.kirupa.com/t/indexof-in-an-array-of-movieclips/331652/1 "2013-09-18T00:42:10Z")

</div>

Hello… I wanna ask something  
I have an array of movieClips and I can’t retrieve the elements position with indexOf()

```auto

var menuArray:Array =
[
{menu:menu_verde, display:display_verde},
{menu:menu_rojo, display:display_rojo},
{menu:menu_negro, display:display_negro},
{menu:menu_blanco, display:display_blanco},
{menu:menu_azul, display:display_azul},
{menu:menu_amarillo, display:display_amarillo}
];

```

When I write

```auto
trace ("position "+menuArray.indexOf(menu_negro));

```

I got “position -1”, and -1 is what appears if the element wasn’t found, am I right?  
Can you please tell me why is this due to ? Is not possible to find the value with this array’s schema?

Excuse me about my weak english  
Thanks. Lio
