User Guide

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 models
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 modifiers 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.