# getChildIndex(); Problem

**URL:** <https://forum.kirupa.com/t/getchildindex-problem/327406>\
**Category:** flash\
**Created:** [February 27, 2012, 3:01pm UTC](https://forum.kirupa.com/t/getchildindex-problem/327406 "2012-02-27T15:01:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![molkman](https://avatars.discourse-cdn.com/v4/letter/m/8dc957/32.png) [@molkman](https://forum.kirupa.com/u/molkman)\
**Post date:** [February 27, 2012, 3:01pm UTC](https://forum.kirupa.com/t/getchildindex-problem/327406/1 "2012-02-27T15:01:10Z")

</div>

Hello,  
I have a problem with the getChildIndex() method. I have an array that stores multiple children and I want to perform a hitTest that only works on children with a certain depth, with one that is lower than the other hitTest “partner”. Therefore I want to check the depth of that certain child.

I tried to trace the depth, but I get crazy errors doing that. No matter if I do it from the child itself, or from the Document Class.

trace(getChildIndex(foes[7][1][1]))

[7] is the current level, [1] is the type of child and the second [1] is the child itself called [Object EnGob]. I put it there by the push() command.

There’s not much I know about the getChildIndex() command and I couldn’t find the right tutorial online, so can anybody help me? This doesn’t look like a huge problem, I hope.
