Lingo Dictionary > A-C > currentTime |  |

currentTime

Syntax

    sprite(whichSWASprite).currentTime
    the currentTime of sprite whichSWASprite
    sound(channelNum).currentTime

Description

Sound property; for Shockwave Audio (SWA) and QuickTime sprites, returns the current playing time, in milliseconds, for the specified sprite. For SWA and QuickTime sprites, this property can be tested but not set. To set the current playing time of a QuickTime sprite, use `the movieTime`.

Shockwave Audio sounds appear as sprites in sprite channels, but they play sound in a sound channel. You should refer to SWA sound sprites by their sprite channel number rather than by a sound channel number.

For all other sounds playing in a sound channel, this property returns the current playing time of the sound member currently playing in the given sound channel. For these sounds, this property can be tested and set. When this property is set, the range of allowable values is from zero to the `duration` of the member.

Example

This statement displays the current time, in seconds, of the SWA sound sprite in sprite channel 10.

Dot syntax:

    member("time").text = string(sprite (10).currentTime/ 1000)

Verbose syntax:

    set the text of member "time" to (the currentTime of sprite 10) / 1000

Example

This statement causes the sound playing in sound channel 2 to skip to the point 2.7 seconds from the beginning of the sound cast member:

    sound(2).currentTime = 2700

See also

`movieTime, duration`