716
Chapter 14: Properties
Example
The following handler in a cast member or movie script switches the cast member assigned to the
sprite involved in the
mouseDown
event:
-- Lingo syntax
on mouseDown
sprite(_player.currentSpriteNum).member = member("DownPict")
end
// JavaScript syntax
function mouseDown() {
sprite(_player.currentSpriteNum).member = member("DownPict");
}
See also
Player
,
spriteNum
currentTime (3D)
Usage
member(
whichCastmember
).model(
whichModel
).keyframePlayer.\
currentTime
member(
whichCastmember
).model(
whichModel
).bonesPlayer.\
currentTime
Description
3D
keyframePlayer
and
bonesPlayer
modifier property; indicates the local time of the motion
being executed by the model. The
currentTime
property is measured in milliseconds, but it only
corresponds to real time when the motion is playing at its original speed.
Playback of a motion by a model is the result of either a
play()
or
queue()
command. The
scale
parameter of the
play()
or
queue()
command is multiplied by the modifier’s
playRate
property, and the resulting value is multiplied by the motion’s original speed to determine how
fast the model will execute the motion and how fast the motion’s local time will run. So if the
scale
parameter has a value of 2 and the modifier’s
playRate
property has a value of 3, the
model will execute the motion six times as fast as its original speed and local time will run six
times as fast as real time.
The
currentTime
property resets to the value of the
cropStart
parameter of the
play()
or
queue()
command at the beginning of each iteration of a looped motion.
Example
This statement shows the local time of the motion being executed by the model named Alien3.
put member("newalien").model("Alien3").keyframePlayer.currentTime
-- 1393.8599
See also
play() (3D)
,
queue() (3D)
,
playlist
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...