# \[AS 2.0\]getChildIndex(mC)

**URL:** <https://forum.kirupa.com/t/as-2-0-getchildindex-mc/300529>\
**Category:** flash\
**Created:** [November 23, 2009, 9:29am UTC](https://forum.kirupa.com/t/as-2-0-getchildindex-mc/300529 "2009-11-23T09:29:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![NamikazeMinato](https://avatars.discourse-cdn.com/v4/letter/n/c77e96/32.png) [@NamikazeMinato](https://forum.kirupa.com/u/NamikazeMinato)\
**Post date:** [November 23, 2009, 9:29am UTC](https://forum.kirupa.com/t/as-2-0-getchildindex-mc/300529/1 "2009-11-23T09:29:17Z")

</div>

I have a series of movieclips namely alpha1,alpha2…till alpha56,inside another parent movieclip parentMc.

The problem is do I have to write onPress() event actions for each alpha movieclip ?

Or is there any other way to get the childMovieClip index so that I need to write only onPress function for the ParentMc…

like  
parentMc.onPress=function()  
{  
if(getChildIndex(parentMc)  
{  
//get data from child Mc…  
}  
}

PLEASE HELP ME OUT !!!..

P.S. I know there is that option in AS3…But is that there in AS2.0…???..  
Cheers…:evil2:
