Lingo Dictionary > D-F > elapsedTime |
![]() ![]() ![]() |
elapsedTime
Syntax
sound(
channelNum
).elapsedTime
the elapsedTime of sound
channelNum
Description
This read-only property gives the time, in milliseconds, that the current sound member in the given sound channel has been playing. It starts at 0 when the sound begins playing and increases as the sound plays, regardless of any looping, setting of the currentTime
or other manipulation. Use the currentTime
to test for the current absolute time within the sound.
The value of this property is a floating-point number, allowing for measurement of sound playback to fractional milliseconds.
Example
This idle handler displays the elapsed time for sound channel 4 in a field on the Stage during idles:
on idle member("time").text = string(sound(4).elapsedTime) end idle
See also
currentTime
, loopCount
, loopsRemaining
, rewind()
![]() ![]() ![]() |