User Guide

718 Chapter 14: Properties
// JavaScript syntax
put(sprite(9).currentTime);
This statement sets the current time of the QuickTime movie in channel 9 to the value in the
variable
Poster:
-- Lingo syntax
sprite(9).currentTime = Poster
// JavaScript syntax
sprite(9).currentTime = Poster;
See also
duration (Member)
currentTime (RealMedia)
Usage
-- Lingo syntax
memberOrSpriteObjRef.currentTime
// JavaScript syntax
memberOrSpriteObjRef.currentTime;
Description
RealMedia sprite or cast member property; allows you to get or set the current time of the
RealMedia stream, in milliseconds. If the RealMedia cast member is not playing, the value of this
property is 0, which is the default setting. This is a playback property, and it is not saved.
If the stream is playing when the
currentTime property is set or changed, a seek action takes
place, the stream rebuffers, and then playback resumes at the new time. If the stream is paused
(
#paused mediaStatus value) when currentTime is set or changed, the stream redraws the
frame at the new time, and it resumes playback if
pausedAtStart is set to FALSE. When the
stream is paused or stopped in the RealMedia viewer,
mediaStatus is #paused. When the stream
is stopped by the Lingo
stop command, mediaStatus is #closed. This property has no effect if
the streams
mediaStatus value is #closed. When you set integer values, they are clipped to the
range from 0 to the duration of the stream.
Setting
currentTime is equivalent to invoking the seek command: x.seek(n) is the same as
x.currentTime = n. Changing currentTime or calling seek will require the stream to be
rebuffered.
Example
The following examples show that the current time of the sprite 2 and the cast member Real is
15,534 milliseconds (15.534 seconds) from the beginning of the stream.
-- Lingo syntax
put(sprite(2).currentTime) -- 15534
put(member("Real").currentTime) -- 15534
// JavaScript syntax
put(sprite(2).currentTime) // 15534
put(member("Real").currentTime) // 15534
The following examples cause playback to jump 20,000 milliseconds (20 seconds) into the stream
of sprite 2 and the cast member Real.