flex 4 - layer a component on top of another?

12,881

Solution 1

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.

Solution 2

checkout the new depth property introduced in Flex 4 e.g. see http://www.tink.ws/blog/flex-4-uicomponent-depth/

Solution 3

Maybe this help: container's depth

you can use depth property of flex containers to define which element can overlap other elements.

Share:
12,881
kristen
Author by

kristen

Updated on June 14, 2022

Comments

  • kristen
    kristen about 2 years

    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.