User Guide
FLVPlayback class 621
totalTime A number that is the total playing time for the video. Optional.
isLive A Boolean value that is true if the video stream is live. This value is effective only
when streaming from a FCS or FVSS. The value of this property is ignored for an HTTP
download. Optional.
Returns
Nothing.
Description
Method; plays the video stream. With no parameters, the method simply takes the FLV file
from a paused or stopped state to the playing state.
If parameters are used, the method acts as a shortcut for setting the
autoPlay property to
true and setting the isLive, totalTime and, contentPath properties. If the totalTime and
isLive properties are undefined, they are not set.
Example
The following example disables the FLV file from playing automatically, calls the
seekSeconds() method to set the playhead 20 seconds into the video, and calls the play()
method to begin playing the FLV file at that point.
Drag an FLVPlayback component to the Stage, and give it an instance name of
my_FLVPlybk. Then add the following code to the Actions panel on Frame 1 of the
Timeline:
/**
Requires:
- FLVPlayback component on the Stage with an instance name of my_FLVPlybk
*/
import mx.video.*;
my_FLVPlybk.autoPlay = false;
var listenerObject:Object = new Object();
listenerObject.ready = function(eventObject:Object):Void {
my_FLVPlybk.seekSeconds(4);
my_FLVPlybk.play();
};
my_FLVPlybk.addEventListener("ready", listenerObject);
my_FLVPlybk.contentPath = "http://www.helpexamples.com/flash/video/
water.flv";
See also
FLVPlayback.autoPlay, FLVPlayback.contentPath, FLVPlayback.load(),
FLVPlayback.pause(), FLVPlayback.stop()