Parameters
Required. A reference to the camera to add to the list of cameras for the sprite.
whichCamera
Required. An integer that specifies the index in the list of cameras at which
index
is added. If
index
the list.
Example
This statement inserts the camera named FlightCam at the fifth index position of the list of
cameras of sprite 12:
--Lingo syntax
sprite(12).addCamera(member("scene").camera("FlightCam"), 5)
// JavaScript syntax
sprite(12).addCamera(member("scene").camera("FlightCam"), 5);
See also
cameraCount(),
addChild
Usage
-- Lingo syntax
member(whichCastmember).node(whichParentNode).addChild(member\
(whichCastmember).node(whichChildNode) {,#preserveWorld})
// JavaScript syntax
member(whichCastmember).node(whichParentNode).addChild(member\
(whichCastmember).node(whichChildNode) {,symbol(preserveWorld)})
Description
3D command; adds a node to the list of children of another node, and removes it from the list of
children of its former parent.
An equivalent to this method would be to set the
parent node.
Parameters
Required. A reference to the cast member that contains the node to add.
addMemberRef
Required. A reference to the node to add. This node can be a model, group, camera,
addNodeRef
or light.
symPreserveParentOrWorld
for the sprite. Valid values are
with
#preserveParent
and the child jumps to that transform in the space of its new parent. The child's world transform
is recalculated. When the child is added with
the child remains unchanged and the child does not jump to its transform in the space of its new
parent. Its parent-relative transform is recalculated.
is greater than the value of
deleteCamera
Optional. A reference to the camera to add to the list of cameras
#preserveWorld
specified, the parent-relative transform of the child remains unchanged
, the camera is added to the end of
cameraCount()
property of the child node to the
parent
or
#preserveParent
specified, the world transform of
#preserveWorld
whichCamera
. When the child is added
addChild
233
Need help?
Do you have a question about the DIRECTOR MX 2004-DIRECTOR SCRIPTING and is the answer not in the manual?
Questions and answers