MANDAR

Action script 3.0 : Depth Mantain

Posted in Flash Designer by Mandar on May 12, 2009

Previous version in As2.0 depth maintain by swapDepth() method, but in AS3.0 the method getNextHighestDepth is no longer supported. Here’s how to swap depth in Actionscript 3. 0 Use the setChildIndex() method to changes the position of an existing child in the display object container with the instances name.

Where In AS3.0 set the depth automatically through indexing like addChild(car) maintain on 0 depth while car.addChild(mirror) mirror pushed over car. Maintain depth by addChildAt() method. for example addChildAt(mirror, car).


Leave a Reply

You must be logged in to post a comment.