I’m developing a 3d application and am having troubles with depth control to help get rid of artifacts and the like.
In AS 2 you could just pick an arbitrary depth for an object and place it there:
//AS 2
moveClip.swapDepths(z*1000+x);
//to give it lots of depth space around neighboring clips
//AS 3
mySprite.addChildAt(myShape, z*1000+x);
//throws Range error
but now with the new child management system for display objects everytime I try to use the same concept I receive a Range error, because the “depth” (now index) I’m trying to assign is out of bounds. Any idea on how to do this, or maybe another concept that will work just as well?