Move a clip to the highest depth

/ Published in: ActionScript 3
Save to your folder(s)

Add this to your Utilities class and use it like Utilities.moveToTop(your_clip);

Copy this code and paste it in your HTML
  1. public static function moveToTop(child:DisplayObject):void{
  2. (child.parent != null) ? child.parent.setChildIndex(child, child.parent.numChildren-1) : null;
  3. }

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.