duration (RealMedia, SWA)
747
Example
If the SWA cast member Louie Prima has been preloaded, this statement displays the sound’s
duration in the field cast member Duration Displayer:
-- Lingo syntax
on exitFrame
if member("Louie Prima").state = 2 then
member("Duration Displayer").text = \
string(member("Louie Prima").duration)
end if
end
// JavaScript syntax
function exitFrame() {
if (member("Louie Prima").state == 2) {
member("Duration Displayer").text =
member("Louie Prima").duration.toString()
}
}
duration (RealMedia, SWA)
Usage
-- Lingo syntax
memberOrSpriteObjRef
.duration
// JavaScript syntax
memberOrSpriteObjRef
.duration;
Description
RealMedia or Shockwave audio sprite or cast member property; returns the duration of a
RealMedia or Shockwave Audio stream, in milliseconds. The duration of the stream is not known
until the cast member starts to play. If the stream is from a live feed or has not been played, the
value of this property is 0. This property can be tested but not set.
Example
The following examples show that the duration of the RealMedia stream in sprite 2 and the cast
member Real is 100,500 milliseconds (100.500 seconds).
-- Lingo syntax
put(sprite(2).duration) -- 100500
put(member("Real").duration) -- 100500
// JavaScript syntax
put(sprite(2).duration); // 100500
put(member("Real").duration); // 100500
See also
play() (RealMedia, SWA, Windows Media)
,
seek()
,
currentTime (RealMedia)
Содержание DIRECTOR MX 2004
Страница 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...