View comments | RSS feed

duration (Member)

Usage

-- Lingo syntax
memberObjRef.duration

// JavaScript syntax
memberObjRef.duration;

Description

Cast member property; determines the duration of the specified Shockwave Audio (SWA), transition, Windows Media, and QuickTime cast members.

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:

-- 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() } }

Comments


Macromartin said on Mar 1, 2005 at 8:47 AM :
--- The value is in ticks. ---

At least for Windows Media Video, it's milliseconds (1/1000s) an NOT ticks (1/60s)!

 

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