play() (3D)
447
Example
The first statement in this example assigns the value of the
picture
member property for the
cast member Shrine, which is a bitmap, to the variable
pictureValue
. The second statement
checks whether Shrine is a picture by checking the value assigned to
pictureValue
.
-- Lingo syntax
pictureValue = member("Shrine").picture
put pictureP(pictureValue)
// JavaScript syntax
var pictureValue = member("Shrine").picture;
put(pictureP(pictureValue));
The result is 1, which is the numerical equivalent of
TRUE
.
play() (3D)
Usage
member(
whichCastmember
).model(
whichModel
).bonesPlayer.play()
member(
whichCastmember
).model(
whichModel
).keyframePlayer.play()
member(
whichCastmember
).model(
whichModel
).bonesPlayer.\
play(
motionName
{,
looped
,
startTime, endTime, scale, offset
})
member(
whichCastmember
).model(
whichModel
).keyframePlayer.\
play(
motionName
{,
looped
,
startTime, endTime, scale, offset
})
Description
3D
#keyframePlayer
and
#bonesPlayer
command; initiates or unpauses the execution
of a motion.
When a model’s motion has been initiated or resumed by using this command, the model’s
bonesPlayer.playing
property will be set to
TRUE
.
Use
play()
with no parameters to resume the execution of a motion that has been paused with
the
pause()
command.
Using the
play()
command to initiate a motion inserts the motion at the beginning of the
modifier’s playlist. If this interrupts playback of another motion, the interrupted motion remains
in the playlist in the next position after the newly initiated motion. When the newly initiated
motion ends (if it is non-looping) or if the
playNext()
command is issued, the interrupted
motion will resume playback at the point where it was interrupted.
Parameters
motionName
Required. Specifies the name of the motion to execute. When
motionName
is the
only parameter passed to
play()
, the motion is executed once by the model from beginning to
end at the speed set by the modifier’s
playRate
property.
looped
Optional. Specifies whether the motion plays once (
FALSE
) or continuously (
TRUE
).
startTime
Optional. Measured in milliseconds from the beginning of the motion. When
looped
is
TRUE
, the first iteration of the loop begins at
offset
and ends at
endTime
with all subsequent
repetitions of the motion beginning at
startTime
and end at
endTime
.
Summary of Contents for DIRECTOR MX 2004-DIRECTOR SCRIPTING
Page 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Page 48: ...48 Chapter 2 Director Scripting Essentials...
Page 100: ...100 Chapter 4 Debugging Scripts in Director...
Page 118: ...118 Chapter 5 Director Core Objects...
Page 594: ...594 Chapter 12 Methods...
Page 684: ...684 Chapter 14 Properties See also DVD...
Page 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Page 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Page 1102: ...1102 Chapter 14 Properties...