AS3: Increase Child Index by 1

10,292

Do you mean move it one level higher in its parent's stacking order? Then you do it by swapping it with the clip above it. Like this:

var index:int = myMC.parent.getChildIndex( myMC );
myMC.parent.swapChildrenAt( index, index+1 );

If that's not what you want to do, maybe you could expand on what you mean by child index?

Share:
10,292
James Simpson
Author by

James Simpson

CEO & Founder of GoldFire Studios. Business is my game, and games are my business.

Updated on June 04, 2022

Comments

  • James Simpson
    James Simpson almost 2 years

    How would I increase the child index of a movie clip by 1?