DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

AS3 SwapDepths Equivalent

02.11.2008
| 57352 views |
  • submit to reddit
        
function move_to_top() {
  // This will move the current object to the topmost z-index
  parent.setChildIndex(this, parent.numChildren-1);
}
    

Comments

Snippets Manager replied on Tue, 2011/12/13 - 12:56pm

This code helped me so much and only had to remove the "parent." for it to work with my code. Thank you very much! Miguel