# getChildIndex() usage

**URL:** <https://forum.kirupa.com/t/getchildindex-usage/322533>\
**Category:** flash\
**Created:** [May 24, 2011, 6:09pm UTC](https://forum.kirupa.com/t/getchildindex-usage/322533 "2011-05-24T18:09:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vinnieb](https://avatars.discourse-cdn.com/v4/letter/v/ba8739/32.png) [@vinnieb](https://forum.kirupa.com/u/vinnieb)\
**Post date:** [May 24, 2011, 6:09pm UTC](https://forum.kirupa.com/t/getchildindex-usage/322533/1 "2011-05-24T18:09:19Z")

</div>

Hi all,

I am trying to get the index of an object which is an instance of a class. I need to get the index from within the class.

So I have an instance of a class. When its clicked I need to get the index. I dont really know how to write this. I tried a few things like:

```auto

trace(getChildIndex(this._clip));
trace(parent.getChildIndex(this._clip));
trace(this.getChildIndex());

```

None of the above will give me the index. Anybody knows how to write this?
