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 stream’s
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.
Содержание DIRECTOR MX 2004-DIRECTOR SCRIPTING
Страница 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Страница 48: ...48 Chapter 2 Director Scripting Essentials...
Страница 100: ...100 Chapter 4 Debugging Scripts in Director...
Страница 118: ...118 Chapter 5 Director Core Objects...
Страница 594: ...594 Chapter 12 Methods...
Страница 684: ...684 Chapter 14 Properties See also DVD...
Страница 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Страница 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Страница 889: ...netPresent 889 _player alert Sorry the Network Support Xtras could not be found See also Player...
Страница 1102: ...1102 Chapter 14 Properties...