Controlling Digital Video With Lingo
This TechNote demonstrates how to control digital video using the Lingo commands movieRate and movieTime. For downloadable sample files which illustrate these methods refer to the video section inDirector sample movies (TechNote 14350).
MovieRate
The movieRate property controls the rate at which the digital video in a specific sprite channel plays. The value specifies the playback of the digital video and are as follows:
1 = normal forward
-1 = reverse
0 = stop
2 = fast forward
Note: Higher and lower values may be used to create different effects, but frames may be dropped depending on the performance of the computer.
To start a paused digital video:
sprite(sprite channel).movieRate=1
To stop a currently playing digital video:
sprite(sprite channel).movieRate=0
To play a digital video in reverse:
sprite(sprite channel).movieRate = -1
MovieTime
The movieTime property determines the current time, in ticks, of a digital video playing in the specified channel.
Note: A tick equals 1/60th of a second.
To rewind to the beginning of the digital video:
sprite(sprite channel).movieTime = 0
To rewind the digital video by 1 tick:
sprite(sprite channel).movieTime = the movieTime -1
Note: The movieTime and movieRate properties can only be set on digital video sprites. If the video is not currently on the stage, an attempt to set these properties will result in an error: "Not a digital video sprite".
This content requires Flash
To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.
Download the free Flash Player now!
