User Guide
608 FLVPlayback Component (Flash Professional Only)
Example
The following example shows in the Output panel a sampling of metadata values from the
FLV file cuepoints.flv. It displays the data when the
metadataReceived event occurs.
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.metadataReceived = function(eventObject:Object):Void {
trace("canSeekToEnd is " + my_FLVPlybk.metadata.canSeekToEnd);
trace("Number of cue points is " +
my_FLVPlybk.metadata.cuePoints.length);
trace("Frame rate is " + my_FLVPlybk.metadata.framerate);
trace("Height is " + my_FLVPlybk.metadata.height);
trace("Width is " + my_FLVPlybk.metadata.width);
trace("Duration is " + my_FLVPlybk.metadata.duration + " seconds");
};
my_FLVPlybk.addEventListener("metadataReceived", listenerObject);
my_FLVPlybk.contentPath = "http://www.helpexamples.com/flash/video/
cuepoints.flv";
See also
FLVPlayback.metadataLoaded, FLVPlayback.metadataReceived
FLVPlayback.metadataLoaded
Availability
Flash Player 8.
framerate
A number that is the frame rate of the FLV file.
videodatarate
A number that is the video data rate of the FLV file.
height
A number that is the height of the FLV file.
width
A number that is the width of the FLV file.
duration
A number that specifies the duration of the FLV file in seconds.
Parameter Description