Reputation: 13718
How would I increase the child index of a movie clip by 1?
Upvotes: 2
Views: 10311
Reputation: 221
fenomas is correct. It is also important to note that in AS3 there are no gaps in the child display lists so in order to move it higher in the stacking order there must be other children in the display list to swap with.
A good resource is here -> http://livedocs.adobe.com/flex/3/html/help.html?content=05_Display_Programming_04.html
Upvotes: 0
Reputation: 11139
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?
Upvotes: 5