kiwiboon-blog

Wednesday, June 09, 2010

Send to back

setChildIndex(example,0);

Bring to front

setChildIndex(example,numChildren - 1);

Relative to something else

var otherindex = getChildIndex(theotherthing);

//Behind that thing: 
setChildIndex(example, otherindex) //pushes the other thing forward
//In front of that thing:
setChildIndex(example, otherindex + 1);

Labels: , , ,

Code to remove all Children from the stage:
while (numChildren > 0) {
 removeChildAt(0);
}

Labels: