Lingo Dictionary > D-F > duration |
![]() ![]() ![]() |
duration
Syntax
member(
whichCastMember
)
.
duration
the duration of member
whichCastMember
Description
Cast member property; determines the duration of the specified sound, Shockwave Audio (SWA), transition, or QuickTime cast members.
![]() |
When |
![]() |
When |
![]() |
When |
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.
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:
on exitFrame if member("Louie Prima").state = 2 then member("Duration Displayer").text = member("Louie Prima").duration end if end
Example
You can use a behavior on a digital video sprite to loop the playback head in the current frame until the movie is finished playing, allowing it to continue when the end is reached:
property spriteNum on exitFrame me myMember = sprite(spriteNum).member myDuration = member(myMember).duration myMovietime = sprite(spriteNum).movieTime if myDuration > myMovietime then go to the frame else go to the frame + 1 end if end
See also
![]() ![]() ![]() |