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?