Class List

Class DisplayObjectContainer

Extends DisplayObject.
The DisplayObjectContainer class is an abstract base class for all objects that can contain child objects. It cannot be instantiated directly.
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.

Class Summary
Constructor Attributes Constructor Name and Description
 
Constructor.
Field Summary
Field Attributes Field Name and Description
 
An array list of all children in the display object container.
 
Determines whether or not the children of the object are mouse enabled.
Fields borrowed from class DisplayObject:
alpha, height, id, mouseEnabled, name, parent, regX, regY, rotation, scaleX, scaleY, stage, useHandCursor, visible, width, x, y
Method Summary
Method Attributes Method Name and Description
 
addChild(child)
Adds a child DisplayObject instance to this DisplayObjectContainer instance.
 
addChildAt(child, index)
Adds a child DisplayObject instance to the specific index of this DisplayObjectContainer instance.
 
contains(child)
Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.
 
getChildAt(index)
Returns the child display object instance that exists at the specified index.
 
Returns the child display object that exists with the specified name.
 
Returns the index position of a child DisplayObject instance.
 
Returns the number of children of this object.
 
getObjectUnderPoint(x, y, usePixelCollision, tolerance, returnAll)
Returns an array of objects that lie under the specified point and are children(or grandchildren, and so on) of this DisplayObjectContainer instance.
 
Removes all children of the DisplayObjectContainer.
 
removeChild(child)
Removes the specified child DisplayObject instance from the child list of the DisplayObjectContainer instance.
 
Removes a child DisplayObject from the specified index position in the child list of the DisplayObjectContainer.
 
Removes a child DisplayObject with the specified name in the child list of the DisplayObjectContainer.
 
setChildIndex(child, index)
Changes the position of an existing child in the display object container.
Methods borrowed from class DisplayObject:
getCurrentHeight, getCurrentWidth, getRect, getStage, globalToLocal, hitTestObject, hitTestPoint, localToGlobal, localToTarget, onMouseEvent, render, toString
Methods borrowed from class EventDispatcher:
addEventListener, dispatchEvent, hasEventListener, removeAllEventListeners, removeEventListener, removeEventListenerByType
Class Detail
DisplayObjectContainer()
Constructor.
Field Detail
children
An array list of all children in the display object container.

mouseChildren
Determines whether or not the children of the object are mouse enabled.
Method Detail
addChild(child)
Adds a child DisplayObject instance to this DisplayObjectContainer instance.
Parameters:
child

addChildAt(child, index)
Adds a child DisplayObject instance to the specific index of this DisplayObjectContainer instance.
Parameters:
child
index

contains(child)
Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.
Parameters:
child

getChildAt(index)
Returns the child display object instance that exists at the specified index.
Parameters:
index

getChildByName(name)
Returns the child display object that exists with the specified name.
Parameters:
name

getChildIndex(child)
Returns the index position of a child DisplayObject instance.
Parameters:
child

getNumChildren()
Returns the number of children of this object.

getObjectUnderPoint(x, y, usePixelCollision, tolerance, returnAll)
Returns an array of objects that lie under the specified point and are children(or grandchildren, and so on) of this DisplayObjectContainer instance.
Parameters:
x
y
usePixelCollision
tolerance
returnAll

removeAllChildren()
Removes all children of the DisplayObjectContainer.

removeChild(child)
Removes the specified child DisplayObject instance from the child list of the DisplayObjectContainer instance.
Parameters:
child

removeChildAt(index)
Removes a child DisplayObject from the specified index position in the child list of the DisplayObjectContainer.
Parameters:
index

removeChildByName(name)
Removes a child DisplayObject with the specified name in the child list of the DisplayObjectContainer.
Parameters:
name

setChildIndex(child, index)
Changes the position of an existing child in the display object container.
Parameters:
child
index

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jul 25 2011 15:02:39 GMT+0800 (CST)