tags:

views:

81

answers:

1

How can I change the z axis of components and put one in front of the other? The new layout property in Flex 4 has changed significantly & now not sure how to do it.

A: 

It works the same way that it did in Flex 3. A components Z order is defined by the order in which they are placed as child of their parent. The second child will be in front of the first child, and the third child will be in front of the first and second child and so on.

You can still use swapChildren and swapChildrenAt to change the Z-order of children.

The layout property's value will be an instance of a Layout class; which--in a simple form your measure() and updateDisplayList() methods. IT does not, specifically, relate to moving one component in front of, or behind, another.

On a Flex 4 group, you can use swapElement and swapElementsAt, although I would bet if you were to examine the code you'd find that these are just layers of abstraction over swapChildren and swapChildrenAt.

www.Flextras.com
seems kind of a difficult way to get at what should be a simple task. Why can't I just set the "z" property for each child? ie <local:custom_component z="1"/>?
ginius
The z Property has to do with the 3D coordinate system (x, y, z) of the component and has nothing to do with the Z-order (Relation of components to each other). I agree, I wish there was an easier way, but there isn't.
www.Flextras.com
I appreciate your help...I will look into your suggestion above.
ginius