currentTime (Sprite)
719
-- Lingo syntax
sprite(2).currentTime = 20000
member("Real").currentTime = 20000
// JavaScript syntax
sprite(2).currentTime = 20000
member("Real").currentTime = 20000
See also
duration (RealMedia, SWA)
,
seek()
,
mediaStatus (RealMedia, Windows Media)
currentTime (Sprite)
Usage
-- Lingo syntax
spriteObjRef
.currentTime
// JavaScript syntax
spriteObjRef
.currentTime;
Description
Sprite and sound channel property; returns the current playing time, in milliseconds, for a sound
sprite, QuickTime digital video sprite, or any Xtra extension that supports cue points. For a
sound channel, returns the current playing time of the sound member currently playing in the
given sound channel.
This property can be tested, but can only be set for traditional sound cast members (WAV, AIFF,
SND). When this property is set, the range of allowable values is from zero to the
duration
of
the member.
Shockwave Audio (SWA) sounds can appear as sprites in sprite channels, but they play sound in a
sound channel. You should refer to SWA sound sprites by their sprite channel number rather than
by a sound channel number.
Example
This statement displays the current time, in seconds, of the sound sprite in sprite channel 10.
-- Lingo syntax
member("time").text = string(sprite(10).currentTime/ 1000)
// JavaScript syntax
member("time").text = (sprite(10).currentTime / 1000).toString();
This statement causes the sound playing in sound channel 2 to skip to the point 2.7 seconds from
the beginning of the sound cast member:
-- Lingo syntax
sound(2).currentTime = 2700
// JavaScript syntax
sound(2).currentTime = 2700;
See also
duration (Member)
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...