The DisplayObjectContainer3D class is the base class for all objects that can serve as DisplayObject3D containers.
Each DisplayObjectContainer3D object has its own child list.
protected var _children:Dictionary
[internal-use] Names indexed by children.
children:Object [read-only]
Returns the children object.
Implementation
public function get children():Object
protected var _childrenByName:Object
[internal-use] Children indexed by name.
numChildren:int [read-only]
Returns the number of children of this object.
Implementation
public function get numChildren():int
public var root:DisplayObjectContainer3D
[read-only] [read-only] The scene, which is the top-most displayObjectContainer3D in the tree structure.
public function DisplayObjectContainer3D()
Creates a new DisplayObjectContainer3D object.
public function addChild(child:DisplayObject3D, name:String = null):DisplayObject3D
Adds a child DisplayObject3D instance to this DisplayObjectContainer instance.
[TODO: If you add a child object that already has a different display object container as a parent, the object is removed from the child list of the other display object container.]
Parameters
| child:DisplayObject3D — The DisplayObject3D instance to add as a child of this DisplayObjectContainer3D instance.
|
| |
| name:String (default = null) — An optional name of the child to add or create. If no name is provided, the child name will be used.
|
Returns
| DisplayObject3D —
The DisplayObject3D instance that you have added or created.
|
public function addChildren(parent:DisplayObject3D):DisplayObjectContainer3D
Adds all the children of a DisplayObject3D instance to this DisplayObjectContainer instance.
Parameters
| parent:DisplayObject3D — The DisplayObjectContainer3D instance that contains the children to add.
|
Returns
public function childrenList():String
Returns a string value with the list of objects.
Returns
public function getChildByName(name:String, recursive:Boolean = false):DisplayObject3D
Returns the child display object that exists with the specified name.
If more that one child display object has the specified name, the method returns the first object in the child list.
Parameters
| name:String — The name of the child to return.
|
| |
| recursive:Boolean (default = false) |
Returns
public function removeChild(child:DisplayObject3D):DisplayObject3D
Removes the specified child DisplayObject3D instance from the child list of the DisplayObjectContainer3D instance.
[TODO: The parent property of the removed child is set to null, and the object is garbage collected if no other references to the child exist.]
The garbage collector is the process by which Flash Player reallocates unused memory space. When a variable or object is no longer actively referenced or stored somewhere, the garbage collector sweeps through and wipes out the memory space it used to occupy if no other references to it exist.
Parameters
Returns
| DisplayObject3D —
The DisplayObject3D instance that you pass in the child parameter.
|
public function removeChild(child:DisplayObject3D):DisplayObject3D
Parameters
Returns
public function removeChildByName(name:String):DisplayObject3D
Removes the child DisplayObject3D instance that exists with the specified name, from the child list of the DisplayObjectContainer3D instance.
If more that one child display object has the specified name, the method removes the first object in the child list.
[TODO: The parent property of the removed child is set to null, and the object is garbage collected if no other references to the child exist.]
The garbage collector is the process by which Flash Player reallocates unused memory space. When a variable or object is no longer actively referenced or stored somewhere, the garbage collector sweeps through and wipes out the memory space it used to occupy if no other references to it exist.
Parameters
| name:String — The name of the child to remove.
|
Returns
public override function toString():String
Returns a string value with the list of objects.
Returns