Working with Models and Model Resources
485
clone(
name)
Clones a model named
name
, adds it to the child list of the
model’s parent, and adds it to the world.
The clone shares the same model resource, shader list,
and parent as the original model, but it has unique copies
of the model’s transform and modifier properties.
All children of the model 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
model palette, has no parent, and has no children. This
option lets you quickly create temporary model instances.
Lingo model object
cloneDeep(
name)
Clones both the model and the model resource used by
the model’s children. Modifications to the clones’ resource
don’t affect the source model’s resource.
This is a more memory-intensive operation than
clone(
name
)
.
Lingo model object
addtoWorld()
Adds the model to the currently active 3D world, setting its
parent as “world.” Equivalent to
model.parent=member("scene").group
("world")
All newly created models are added to the world by
default, without it being necessary to use this command.
Nothing
getWorld
Transform()
Sets this model’s position and orientation relative to the
world model’s position and orientation.
Nothing
remove
FromWorld()
For models 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 models whose parent hierarchy terminates in the
world, the value is
TRUE (1)
and the model is
potentially visible.
TRUE (1)
or
FALSE (0)
registerScript
(
eventName,
handlerName,
scriptInstance
)
Registers a handler named
handlerName
that is called
in the
scriptInstance
when the member function
sendEvent()
is called with
eventName
as an
argument.
If
scriptInstance
is 0, a movie script
handler is called.
The user defines what
eventName
is.
TRUE (1)
or
FALSE
(0)
, with
TRUE (1)
indicating that the event
happened and
FALSE
(0)
that it did not
addModifier
(
symbol
)
Adds the modifier
symbol
.
TRUE (1)
if
symbol
is
a valid modifier
FALSE (0)
if
symbol
is not a valid modifier
removeModifier
(
symbol
)
Removes the first modifier identified by
symbol
.
TRUE (1)
if
symbol
is
a valid modifier and
attached to the model
FALSE (0)
if
symbol
is not a valid modifier or
is not attached to
the model
update()
Updates animation timing without rerendering.
Used to force update of bone positions in an animation
while inside a Lingo call.
TRUE (1)
or
FALSE (0)
Command
Description
Returns
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...