Working with Models and Model Resources
513
Light commands
Use these commands to work with lights:
spotDecay
Get and set
TRUE (1)
/
FALSE (0)
value that controls
whether or not spotlight intensity falls off with
camera distance.
FALSE (0)
pointAt
Orientation
Get and set
Two orthogonal vectors
(objectRelativeDirection
and
objectRelativeUp)
controlling how the
light’s
pointAt
command works.
None
boundingSphere
Get
A list containing a vector and a floating-point
value, with the vector representing the position
and the value the radius of a bounding sphere
surrounding the light and all its children.
[vector
(0,0,0),
0.0]
worldPosition
Get and set
Position of the light in world coordinates.
Shortcut for the command
node
.
getWorldTransform
()position
.
Vector object
Command
Description
Returns
addChild
(
aNode,
preserveWorld
)
Adds the node
aNode
to this light’s list of children. An equivalent
operation is to set
aNode.parent = this light
.
The
preserveWorld
argument is optional. It can have two values:
#preserveWorld
or
#preserveParent
. If the value is
#preserveWorld
, the world transform of the child being added
remains intact. If
#preserveParent
, the child’s transform is
interpreted as remaining parent-relative.
Nothing
child[
index
]
Returns the child at the specified position in the index.
Lingo light object
child(
name
)
Returns a reference to the named child.
Lingo light object
clone(
name
)
Clones a light named
name
, adds it to light’s parent’s child list, and
adds it to the world.
All children of the light are automatically cloned.This can be avoided
by removing the children, performing the cloning operation, and then
adding the children back.
If the name is omitted or is
""
, the clone isn’t added to the light
palette, has no parent, and has no children. This option lets you
quickly create temporary light instances.
Lingo light object
cloneDeep
(
name
)
Clones both the light and all resources used by the light’s children.
Lingo light object
addtoWorld()
Adds light to currently active 3D world, setting its parent as
"world"
.
Equivalent to:
light.parent = member
("scene").light("world")
.
All newly created lights are added to the world by default, without it
being necessary to use this command.
Nothing
removeFrom
World()
For lights whose parent hierarchy terminates in the world, this sets
their parent to
void
and removes them from the world. Otherwise it
does nothing.
Nothing
isInWorld()
For lights whose parent hierarchy terminates in the world, the value is
TRUE (1)
.
TRUE (1)
or
FALSE (0)
Property Name
Access
Description
Default
Summary of Contents for DIRECTOR MX-USING DIRECTOR MX
Page 1: ...Using Director MX Macromedia Director MX...
Page 12: ...Contents 12...
Page 156: ...Chapter 4 156...
Page 202: ...Chapter 6 202...
Page 244: ...Chapter 7 244...
Page 292: ...Chapter 10 292...
Page 330: ...Chapter 12 330...
Page 356: ...Chapter 13 356...
Page 372: ...Chapter 14 372...
Page 442: ...Chapter 16 442...
Page 472: ...Chapter 18 472...
Page 520: ...Chapter 19 520...
Page 536: ...Chapter 20 536...
Page 562: ...Chapter 23 562...
Page 566: ...Chapter 24 566...
Page 602: ...Chapter 27 602...