# Move an object to the lowest depth?

**URL:** <https://forum.kirupa.com/t/move-an-object-to-the-lowest-depth/284402>\
**Category:** Uncategorized\
**Created:** [March 18, 2009, 9:01pm UTC](https://forum.kirupa.com/t/move-an-object-to-the-lowest-depth/284402 "2009-03-18T21:01:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sam\_baker](https://avatars.discourse-cdn.com/v4/letter/s/c57346/32.png) [@sam\_baker](https://forum.kirupa.com/u/sam_baker)\
**Post date:** [March 18, 2009, 9:01pm UTC](https://forum.kirupa.com/t/move-an-object-to-the-lowest-depth/284402/1 "2009-03-18T21:01:49Z")

</div>

When I click on an object, I need it (technically it’s parent object) to drop to the lowest level, but I’m having a heck of time. I’ve tried:

stage.setChildIndex(this, 0);  
and  
stage.swapChildrenAt(0, getChildIndex(this));

Which seem like they would both do what I want, but both of which get an Error #2006: The supplied index is out of bounds.

I’ve also tried:  
stage.setChildIndex(e.target.parent, 0);

which produces Error #2025: The supplied DisplayObject must be a child of the caller.

and stage.setChildIndex(this.parent, 0);

which doesn’t error, but also doesn’t do what I want it to do.

Any thoughts?
