/ Published in: ActionScript 3
Expand |
Embed | Plain Text
function clicked(event:MouseEvent):void { var circle:Sprite = Sprite(event.target); var topPosition:uint = container.numChildren - 1; container.setChildIndex(circle, topPosition); }
Comments
Subscribe to comments
You need to login to post a comment.

You can attach this function to stage's Event.ADDED so this will automaticly pop-up to the top of display list every time new child is added
You can attach this function to stage's Event.ADDED so this will automaticly pop-up to the top of display list every time new child is added