User Guide
FLVPlayback class 685
When you set this property, the value takes effect for the next FLV file that is loaded by setting
contentPath. It has no effect on an FLV file that has already loaded. Also, this property does
not return the new value passed in until an FLV file is loaded.
Playback still works if this property is never set (either explicitly or automatically), but it can
cause problems with seek controls.
Example
The following example shows the total time for the FLV file in seconds when the ready event
occurs, after loading is complete.
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.*;
var listenerObject:Object = new Object();
listenerObject.ready = function(eventObject:Object):Void {
trace("Total play time for this video is: " + my_FLVPlybk.totalTime);
};
my_FLVPlybk.addEventListener("ready", listenerObject);
my_FLVPlybk.contentPath = "http://www.helpexamples.com/flash/video/
water.flv";
See also
FLVPlayback.contentPath, FLVPlayback.playheadTime, FLVPlayback.playing,
FLVPlayback.stopped
FLVPlayback.transform
Availability
Flash Player 8.
Edition
Flash Professional 8.
Usage
my_FLVPlybk.transform