ADOBE DIRECTOR 11.0
User Guide
373
clone(
name
)
Clones a light named
name
, adds it to the 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.
Light object.
cloneDeep
(
name
)
Clones both the light and all resources used by the light’s children.
Light object.
addtoWorld()
Adds light to currently active 3D world, setting its parent as “
world
”.
All newly created lights are added to the world by default, without it
being necessary to use this method.
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()
Returns a Boolean value indicating if the light is currently in the world
(TRUE) or not (FALSE). This is useful for detecting if a given node’s
parent-hierarchy tree terminates with the world group object or not.
TRUE (1)
or
FALSE (0)
registerScript
(
eventName,
handlerName,
scriptInstance
)
Registers a handler named
handlerName
that is called in the
scriptInstance
when the member method
sendEvent()
is called
with
eventName
as an argument.
If
scriptInstance
is 0, a movie script handler is called.
The user defines what
eventName
is. The
eventName
specified can be
one of a default set of events or a user-defined custom event. The
default events are #collideAny, #collideWith, #animationStarted,
#animationEnded, #timeMS.
Nothing.
translate
(
xIncrement
,
yIncrement
,
zIncrement
,
relativeTo
)
Moves the light forward by
xIncrement
along the x-axis,
yIncrement
along the y-axis, and
zIncrement
along the z-axis.
The
relativeTo
parameter is optional. It determines how arguments
are interpreted. The possible values are as follows:
#self
: the default. Increments are applied relative to the light’s local
coordinate system.
#parent
: increments are relative to the light’s parent’s coordinate
system.
#world
: increments are relative to the world’s coordinate system.
Equivalent to
#parent
if the parent is the world.
node
(model, light, camera, or group): increments are relative to the
argument’s coordinate system.
Nothing.
translate(x,y,z,
relativeTo)
Moves the light distance
x
along the x-axis, distance
y
along the y-axis,
and distance
z
along the z-axis. The
relativeTo
argument is optional
and defaults to
#self
.
This method can also be written as
translate
(vector(
x
,
y
,
z
)
relativeTo
)
Nothing.
Method
Description
Returns