Actionscript3 - Move DisplayObject to front or top of displaylist

To move a DisplayObject to the top of the displaylist use the following (where parent is the container of the object being moved to the front). This makes it appear like it's in front of any other DisplayObjects.

parent.setChildIndex(this,parent.numChildren-1);
 
Reply:
 
 
 
 
rendered @ Wed May 22 23:08:09 CEST 2013