Determine the number of DisplayObjects and whether they are DisplayObjects in a container

numChildren

numChildren property represents the number of DisplayObject in the child element. It does not include the grandchild elements.

Example

contains

contains is a function that checks if the DisplayObject specified in the argument is a child element of DisplayObjectContainer. The return value is a boolean value, true if the DisplayObject is a child object or DisplayObjectContainer itself, false otherwise.

Next Chapter