
Groups
365
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 group 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 group’s local coordinate system.
#parent
: increments are relative to the group’s parent’s
coordinate system.
#world
: increments are relative to the world coordinate
system. Equivalent to
#parent
if parent is the world.
node (group, light, camera, or group): increments are
relative to the coordinate system of the argument
object.
Nothing
translate
(
direction
Vector,
relativeTo
)
Moves the group
directionVector.length()
in the
direction of the vector
directionVector
. The
relativeTo
argument is optional and defaults to
#self
.
Nothing
translate
(
x,y,z,
relativeTo
)
Moves the group 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
rotate(
x,y,z,
relativeTo
)
Rotates the group by
x
degrees around the
x
-axis,
y
degrees around the
y
-axis, and
z
degrees around the
z
-axis.
The
relativeTo
argument is optional and defaults to
#self
. If included, it defines the coordinate space of
the axes.
This method can also be written as
rotate(vector(
x,y,z
)
relativeTo
)
.
Nothing
rotate (
position,
axis, angle,
relativeTo
)
Rotates the group around the axis vector in the
specified position the specified number of degrees.
The
relativeTo
argument is optional and defaults to
#self
.
Nothing
Method
Description
Returns
Summary of Contents for DIRECTOR MX 2004-USING DIRECTOR
Page 1: ...DIRECTOR MX 2004 Using Director...
Page 16: ...16 Chapter 1 Introduction...
Page 82: ...82 Chapter 3 Sprites...
Page 98: ...98 Chapter 4 Animation...
Page 134: ...134 Chapter 5 Bitmaps...
Page 242: ...242 Chapter 10 Sound and Synchronization...
Page 274: ...274 Chapter 11 Using Digital Video...
Page 290: ...290 Chapter 12 Behaviors...
Page 302: ...302 Chapter 13 Navigation and User Interaction...
Page 334: ...334 Chapter 15 The 3D Cast Member 3D Text and 3D Behaviors...
Page 392: ...392 Chapter 16 Working with Models and Model Resources...
Page 418: ...418 Chapter 18 Movies in a Window...
Page 446: ...446 Chapter 22 Managing and Testing Director Projects...