Class Index | File Index

Classes


Class createjs.Container


Extends .

Defined in: container.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
A class that contains multiple createjs.DisplayObject instances.
Method Summary
Method Attributes Method Name and Description
 
addChild(var_args)
 
addChildAt(var_args)
 
 
getChildAt(index)
Returns the child at the specified index.
 
Returns the child with the specified name.
 
Returns the index of the specified child in the display list, or -1 if it is not in the display list.
 
Returns a clone of the child list of this container.
 
Returns the number of children in the display list.
 
Returns an array of all display objects under the specified coordinates that are in this container's display list.
 
Similar to the Container.getObjectsUnderPoint() method, but returns only the top-most display object.
 
 
hitTestObject(point, types, bubble)
 
hitTestObjects(point, list, types, bubble)
 
layout(renderer, parent, dirty, time, draw)
 
removeAllChildren(opt_destroy)
 
removeChild(var_args)
 
removeChildAt(var_args)
 
setChildIndex(child, index)
Changes the depth of the specified child.
 
sortChildren(sortFunction)
Sorts the children of this container.
 
swapChildren(child1, child2)
Swaps the specified children's depth in the display list.
 
swapChildrenAt(index1, index2)
Swaps the children at the specified indexes.
Class Detail
createjs.Container()
A class that contains multiple createjs.DisplayObject instances.
Method Detail
addChild(var_args)
Parameters:
var_args

addChildAt(var_args)
Parameters:
var_args

getBounds()

{createjs.DisplayObject} getChildAt(index)
Returns the child at the specified index.
Parameters:
{number} index
Returns:
{createjs.DisplayObject}

{createjs.DisplayObject} getChildByName(name)
Returns the child with the specified name.
Parameters:
{string} name
Returns:
{createjs.DisplayObject}

{number} getChildIndex(child)
Returns the index of the specified child in the display list, or -1 if it is not in the display list.
Parameters:
{createjs.DisplayObject} child
Returns:
{number}

{Array.} getChildren()
Returns a clone of the child list of this container.
Returns:
{Array.}

{number} getNumChildren()
Returns the number of children in the display list.
Returns:
{number} The number of children in the display list.

{Array.} getObjectsUnderPoint(x, y)
Returns an array of all display objects under the specified coordinates that are in this container's display list. This routine ignores any display objects with mouseEnabled set to false. The array will be sorted in order of visual depth, with the top-most display object at index 0. This uses shape based hit detection, and can be an expensive operation to run, so it is best to use it carefully. For example, if testing for objects under the mouse, test on tick (instead of on mousemove), and only if the mouse's position has changed.
Parameters:
{number} x
{number} y
Returns:
{Array.}

{createjs.DisplayObject} getObjectUnderPoint(x, y)
Similar to the Container.getObjectsUnderPoint() method, but returns only the top-most display object. This runs significantly faster than the Container.getObjectsUnderPoint() method, but is still an expensive operation. See the Container.getObjectsUnderPoint() for more information.
Parameters:
{number} x
{number} y
Returns:
{createjs.DisplayObject}

handleDetach()

hitTestObject(point, types, bubble)
Parameters:
point
types
bubble

hitTestObjects(point, list, types, bubble)
Parameters:
point
list
types
bubble

layout(renderer, parent, dirty, time, draw)
Parameters:
renderer
parent
dirty
time
draw

removeAllChildren(opt_destroy)
Parameters:
opt_destroy

removeChild(var_args)
Parameters:
var_args

removeChildAt(var_args)
Parameters:
var_args

setChildIndex(child, index)
Changes the depth of the specified child. Fails silently if the child is not a child of this container, or the index is out of range.
Parameters:
{createjs.DisplayObject} child
{number} index

sortChildren(sortFunction)
Sorts the children of this container.
Parameters:
{function(Object|Object): number|undefined} sortFunction

swapChildren(child1, child2)
Swaps the specified children's depth in the display list. Fails silently if either child is not a child of this object.
Parameters:
{createjs.DisplayObject} child1
{createjs.DisplayObject} child2

swapChildrenAt(index1, index2)
Swaps the children at the specified indexes. Fails silently if either index is out of range.
Parameters:
{number} index1
{number} index2

Documentation generated by JsDoc Toolkit 2.4.0 on Tue Oct 04 2016 17:11:27 GMT+0900 (JST)