You control "depth" by the order in which the display object appears in the display "tree".
To adjust to order, you need to remove and re-insert the child object using something like this: this.addChildAt(this.removeChildAt(1),0); The remove statement pops the item out of the display list, returning a reference to it, then the add places it back in. If I'm mistaken about the ordering then it might be: this.addChild(this.removeChildAt(0)); This takes the first child and puts it at the end. Good luck --- In flexcoders@yahoogroups.com, "elevight" <[EMAIL PROTECTED]> wrote: > > Does anyone know how to control the z-axis of objects? > > Here's a very short code snippet to illustrate my question: > > <?xml version="1.0" encoding="utf-8"?> > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" > layout="absolute"> > <mx:VBox id="vboxRed" backgroundColor="red" width="100" > height="100"/> > <mx:VBox id="vboxBlue" backgroundColor="blue" width="200" > height="50"/> > > </mx:Application> > > In the above, vboxBlue was instantiated after vboxRed, and hence, > appears on top of vboxRed. How can I, during runtime, make vboxRed be > on top of vboxBlue? > > Thanks. >