Skip to main content
added 262 characters in body
Source Link

From the documentation: swapChildren: Swaps the z-order (front-to-back order) of the two specified child objects.

A DisplayObject's z (or index) and it's position in the display object hierarchy are two different things. The z describes in what order the display objects are rendered within the container. A handy way of deciding what should be on top of what. swapChildren is designed for changing this property.

The DisplayObjects' position in the hierarchy also affects the rendering order but it's not the main thing. Children inherit the location, visibility, filters and a lot more.

Enabling one method to do both z swapping and changing the hierarchy is against good practice as they are two very different things. https://sites.google.com/site/unclebobconsultingllc/one-thing-extract-till-you-drop

A DisplayObject's z (or index) and it's position in the display object hierarchy are two different things. The z describes in what order the display objects are rendered within the container. A handy way of deciding what should be on top of what. swapChildren is designed for changing this property.

The DisplayObjects' position in the hierarchy also affects the rendering order but it's not the main thing. Children inherit the location, visibility, filters and a lot more.

Enabling one method to do both z swapping and changing the hierarchy is against good practice as they are two very different things. https://sites.google.com/site/unclebobconsultingllc/one-thing-extract-till-you-drop

From the documentation: swapChildren: Swaps the z-order (front-to-back order) of the two specified child objects.

A DisplayObject's z (or index) and it's position in the display object hierarchy are two different things. The z describes in what order the display objects are rendered within the container. A handy way of deciding what should be on top of what. swapChildren is designed for changing this property.

The DisplayObjects' position in the hierarchy also affects the rendering order but it's not the main thing. Children inherit the location, visibility, filters and a lot more.

Enabling one method to do both z swapping and changing the hierarchy is against good practice as they are two very different things. https://sites.google.com/site/unclebobconsultingllc/one-thing-extract-till-you-drop

Source Link

A DisplayObject's z (or index) and it's position in the display object hierarchy are two different things. The z describes in what order the display objects are rendered within the container. A handy way of deciding what should be on top of what. swapChildren is designed for changing this property.

The DisplayObjects' position in the hierarchy also affects the rendering order but it's not the main thing. Children inherit the location, visibility, filters and a lot more.

Enabling one method to do both z swapping and changing the hierarchy is against good practice as they are two very different things. https://sites.google.com/site/unclebobconsultingllc/one-thing-extract-till-you-drop