User Guide

runMode 515
angle Required if applying a rotation about an arbitrary axis passing through a point in space.
Specifies the amount of rotation about the axis
axis.
relativeTo Optional. Specifies which coordinate system axes are used to apply the desired
rotational changes. The
relativeTo parameter can have any of the following values:
#self applies the increments relative to the nodes local coordinate system (the X, Y and Z
axes specified for the model during authoring). This value is used as the default if you use the
rotate command with a node reference and the relativeTo parameter is not specified.
#parent applies the increments relative to the node’s parent’s coordinate system. This value is
used as the default if you use the
rotate command with a transform reference and the
relativeTo parameter is not specified.
#world applies the increments relative to the world coordinate system. If a model’s parent is
the world, than this is equivalent to using
#parent.
nodeReference allows you to specify a node to base your rotation upon, the command applies
the increments relative to the coordinate system of the specified node.
Example
The following example first rotates the model named Moon about its own Z axis (rotating it in
place), then it rotates that same model about its parent node, the model named Earth (causing
Moon to move orbitally about Earth).
member("Scene").model("Moon").rotate(0,0,15)
member("Scene").model("Moon").rotate(vector(0, 0, 5),
member("Scene").model("Moon"))
The following example rotates the model Ball around a position in space occupied by the model
named Pole. The effect is that the model Ball moves in orbit around Pole in the x-y plane.
polePos = member("3d Scene").model("Pole").worldPosition
member("3d Scene").model("Ball").rotate(polePos, vector(0,0,1), \
5, #world)
See also
pointAt, preRotate, rotation (transform), rotation (engraver shader), rotation
(backdrop and overlay), preScale(), transform (property)
runMode
Usage
the runMode
Description
Function; returns a string indicating the mode in which the movie is playing. Possible values are
as follows:
Author—The movie is running in Director.
Projector—The movie is running as a projector.
BrowserPlugin—The movie is running as a Shockwave Player plug-in or other scripting
environment, such as LiveConnect or ActiveX.
The safest way to test for particular values in this property is to use the
contains operator. This
helps avoid errors and allows partial matches.