The DisplayObjectContainer object is the base object for all objects that can serve as display object containers on the display list. The display list manages all objects displayed in the application runtimes. Use the DisplayObjectContainer object to arrange the display objects in the display list. Each DisplayObjectContainer object has its own child list for organizing the z-order of the objects. The z-order is the front-to-back order that determines which object is drawn in front, which is behind, and so on.

DisplayObject is an abstract base object; therefore, you cannot call DisplayObject directly. Invoking new DisplayObject() throws an ArgumentError exception.


The DisplayObjectContainer object is an abstract base object for all objects that can contain child objects. It cannot be instantiated directly; calling the new DisplayObjectContainer() constructor throws an ArgumentError exception.


Inherited from InteractiveObject -> DisplayObject -> EventDispatcher.


Created DisplayObjectContainer object has properties:

mouseChildren

Determines whether or not the children of the object are mouse, or user input device, enabled. (true/false)

numChildren

[read-only] Returns the number of children of this object.

tabChildren

Determines whether the children of the object are tab enabled. (true/false


methods:

addChild(child)

Adds a child DisplayObject instance to this DisplayObjectContainer instance.

child - The DisplayObject instance to add as a child of this DisplayObjectContainer instance.

addChildAt(child, index)

Adds a child DisplayObject instance to this DisplayObjectContainer instance.

child - The DisplayObject instance to add as a child of this DisplayObjectContainer instance.

index - The index position to which the child is added. If you specify a currently occupied index position, the child object that exists at that position and all higher positions are moved up one position in the child list.

areInaccessibleObjectsUnderPoint(point)

Indicates whether the security restrictions would cause any display objects to be omitted from the list returned by calling the DisplayObjectContainer.getObjectsUnderPoint() method with the specified point point.

point - The point under which to look.

contains(child)

Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

child - The child object to test. (DisplayObject)

getChildAt(index)

Returns the child display object instance that exists at the specified index.

index - The index position of the child object.

getChildByName(name)

Returns the child display object that exists with the specified name.

name - The name of the child to return.

getChildIndex(child)

Returns the index position of a child DisplayObject instance.

child - The DisplayObject instance to identify.

getObjectsUnderPoint(point)

Returns an array of objects that lie under the specified point and are children (or grandchildren, and so on) of this DisplayObjectContainer instance.

point - The point under which to look.

removeChild(child)

Removes the specified child DisplayObject instance from the child list of the DisplayObjectContainer instance.

child - The DisplayObject instance to remove.

removeChildAt(index)

Removes a child DisplayObject from the specified index position in the child list of the DisplayObjectContainer.

index - The child index of the DisplayObject to remove.

removeChildren(beginIndex, endIndex)

Removes all child DisplayObject instances from the child list of the DisplayObjectContainer instance.

beginIndex - (default = 0) - The beginning position. A value smaller than 0 throws a RangeError.

endIndex - (default = 0x7fffffff) - The ending position. A value smaller than 0 throws a RangeError.

setChildIndex(child, index)

Changes the position of an existing child in the display object container.

child - The child DisplayObject instance for which you want to change the index number. 

index - The resulting index number for the child display object.

swapChildren(child1, child2)

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

child1 - The first child object.(DisplayObject)

child2 - The second child object.(DisplayObject)

swapChildrenAt(index1, index2)

Swaps the z-order (front-to-back order) of the child objects at the two specified index positions in the child list.

index1 - The index position of the first child object. 

index2 - The index position of the second child object.


Created with the Personal Edition of HelpNDoc: Full-featured Kindle eBooks generator