I think you are confusing displaylist order with displayobject screen coordinates if you want overlapping objects that can have there priority changed (bring 1 object to the front) you can't touch the display depth(z-axis) of any of these objects, overlapping of visual objects is done exactly the same way as it was done before we were given a 3d co-ordinate system in FP10 on the assumption that you don't touch the z-axis.
If you want to use 3d co-ordinate systems you also have to adjust your programming techniques to suit, for example if an object is being zooming in on once it has a z-axis less than the object in front change the displaylist index order to match.
Thanks for the reply David. Sorry if I haven't explained the problem
clearly enough but I'm not confused. Let's avoid the term "z-axis" as
you solely attribute it to the flash.geom.Matrix3D of the component. As
you write it, I want "bring 1 object to the front" (or at least one
element in front of an other element in a group). This is done with
DisplayObjectContainer.setChildIndex() and has not much to do with the
"Flash 3D stuff". It seems that the current implementation of layout in
Gumbo does not allow this easily. So I only want to know whether this is
true and if yes, whether it is on the road map.
Have you tried playing with IVisualElement layer property?
1 person found this helpful
Hi Marc. The Spark layouts use child order to determine layout. That causes a problem since, as you point in, the flash runtime uses child order to determine sibling relative layering. So in Spark, we've changed the flash player behavior slightly. Spark layouts determine sibling relative layering by comparing the child's 'layer' properties. If two children have the same value for layer (which by default, they all do, with a value of 0), then they layer in sibling relative order.
So in short...set the 'layer' property if you want them to order differently than their order within their parent .
I am having the same issues with layouts and their constaining methods. For example, if I have a TiledLayout with components, I find that the indexing strongly determines the final layout result, and the only thing I have been able to do is change the indexes as a means of changing z-order, last child being the top z and last element always. In other words, I can't seem to put the top element (child) as the first index. I think it means that we are limited to changing the xy coords. If you find a solution, please post it. I'm considering using a basic layout and writing the tiling functions myself. Maybe there is an override solution?
IVisualElement.layer works like a charm. Thanks for pointing me to the property,
Yes, thank you all questions and answers. The layer property works great. And to think all the time I wasted playing with swapping layouts.