AS3 setChildIndex to front

FoxLift picture FoxLift · Jul 31, 2012 · Viewed 18.1k times · Source

Is there a way to send a specific movieClip to the front of all other movieClips on stage?

I know about setChildIndex, but I can't figure out a way to to calculate the top position dynamically.

Answer

Florent picture Florent · Jul 31, 2012

You can use setChildIndex() with numChildren.

setChildIndex(childClip, numChildren - 1);