Swap Depths for AS 2.0
Saturday, March 21st, 2009Every now and again I get asked questions about ActionScript 2.0. Although I would much rather give that person a hug and tell them that AS 3.0 will set them free I know that not everyone can make the jump instantly.
Today I was asked how to swap depths in AS 2.0. No problem right? Wrong! It seemed like everything I tried was jut not working. After I stepped away for a bit I was able to solve the problem but for the life of me I don’t know what was initially wrong. Nevertheless here is the answer.
-
-
// sets swapDepths
-
this.swapDepths(this.getNextHighestDepth())
-
This will place a movieClip at the top of the display order.
Demo Files
ActionScript 2.0 Swap Depths Demo - Project File
ActionScript 2.0 Swap Depths Demo


