Reference to parent DisplayObjectContainer and root DisplayObjectContainer

parent

The parent property points to the parent DisplayObjectContainer. Multiple parents can be used to go back to the ancestor. However, if no child elements of the DisplayObjectContainer are registered, null will be returned.

root

The root property points to the parent DisplayObjectContainer at the highest level of the hierarchy. In most cases this will be the DisplayObjectContainer directly below the Stage. However, it will return null if there are no children of the DisplayObjectContainer registered.

Example

Next Chapter