User Guide
684 FLVPlayback Component (Flash Professional Only)
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.stateChange = function(eventObject:Object):Void {
trace(my_FLVPlybk.state + ": stopped property is: " +
my_FLVPlybk.stopped);
};
my_FLVPlybk.addEventListener("stateChange", listenerObject);
my_FLVPlybk.contentPath = "http://www.helpexamples.com/flash/video/
water.flv";
See also
FLVPlayback.state, FLVPlayback.stateChange, FLVPlayback.stop(),
FLVPlayback.stopped
FLVPlayback.totalTime
Availability
Flash Player 8.
Edition
Flash Professional 8.
Usage
my_FLVPlybk.totalTime
Description
Property; a number that is the total playing time for the video in seconds. When streaming
from a FCS and using the default NCManager, this value is determined automatically by
server-side APIs, and that value overrides anything set through this property or gathered from
metadata. This is also true if you set this value in a SMIL file. The property is ready for
reading when the stopped or playing state is reached after setting the
contentPath property.
This property is meaningless for live streams from a FCS.
For an HTTP download, the value is determined automatically if the FLV file has metadata
embedded; otherwise, set it explicitly or it will be 0. If you set it explicitly, the metadata value
in the stream is ignored.