-- Lingo syntaxmemberObjRef.duration// JavaScript syntaxmemberObjRef.duration;
Cast member property; determines the duration of the specified Shockwave Audio (SWA), transition, Windows Media, and QuickTime cast members.
whichCastMember is a streaming sound file, this property indicates the duration of the sound. The duration property returns 0 until streaming begins. Setting preLoadTime to 1 second allows the bit rate to return the actual duration.
whichCastMember is a digital video cast member, this property indicates the digital video's duration. The value is in ticks.
whichCastMember is a transition cast member, this property indicates the transition's duration. The value for the transition is in milliseconds. During playback, this setting has the same effect as the Duration setting in the Frame Transition dialog box.
This property can be tested for all cast members that support it, but only set for transitions.
To see an example of duration used in a completed movie, see the QT and Flash movie in the Learning/Lingo Examples folder inside the Director application folder.
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()
}
}
RSS feed | Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/director/mx2004/release_en/09_pr202.htm
Comments
Macromartin said on Mar 1, 2005 at 8:47 AM :