Showcase and discover digital art at yex

Follow Design Stacks

Subscribe to our free newsletter to get all our latest tutorials and articles delivered directly to your inbox!

Flash 8 Documentation: FLVPlayback.totalTime



Flash Player 8.


Flash Professional 8.




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.

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.


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:

- FLVPlayback component on the Stage
with an instance name of my_FLVPlybk
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 =