# setChildIndex()?

**URL:** <https://forum.kirupa.com/t/setchildindex/291114>\
**Category:** Uncategorized\
**Created:** [June 24, 2009, 8:31pm UTC](https://forum.kirupa.com/t/setchildindex/291114 "2009-06-24T20:31:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nick23](https://avatars.discourse-cdn.com/v4/letter/n/76d3ee/32.png) [@Nick23](https://forum.kirupa.com/u/Nick23)\
**Post date:** [June 24, 2009, 8:31pm UTC](https://forum.kirupa.com/t/setchildindex/291114/1 "2009-06-24T20:31:37Z")

</div>

I have tried numerous times to get this setChildIndex( child, 0 ); to work, but I just don’t get why it is not working.

I am trying to call this to change the depth of a movie clip and the compiler keeps spitting out:  
ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.  
at flash.display:: DisplayObjectContainer/setChildIndex()  
at game\_fla::MainTimeline/frame1()

Thanks
