How would I increase the child index of a movie clip by 1?
+3
A:
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?
fenomas
2009-06-07 06:01:35
A:
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
sksizer
2009-06-09 14:02:38