User Guide

FLVPlayback class 599
Example
The following example assumes playing a streaming FLV file from a FCS or FVSS. The
example sets the
idleTimeout property to a low value of 10 milliseconds, which triggers a
timeout and, consequently, a
close event on the RTMP connection. The listener for the
close event shows the index number of the video player for which the event occurred.
Drag an FLVPlayback component to the Stage, and give it an instance name of
my_FLVPlybk. In the Component inspector, assign the
contentPath parameter a value that
specifies the location of a streaming FLV file from a FCS or FVSS. 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.idleTimeout = 10;
var listenerObject:Object = new Object();
//listen for close event on RTMP connection; display index of video player
listenerObject.close = function(eventObject:Object) {
trace("Closed connection for video player: " + eventObject.vp);
};
my_FLVPlybk.addEventListener("close", listenerObject);
See also
FLVPlayback.close
FLVPlayback.isFLVCuePointEnabled()
Availability
Flash Player 8.
Edition
Flash Professional 8.
Usage
my_FLVplybk.isFLVCuePointEnabled(time:Number)
my_FLVplybk.isFLVCuePointEnabled(name:String)
my_FLVplybk.isFLVCuePointEnabled(cuePoint:Object)
Parameters
time A number that is the time, in seconds, of the cue point for which to search.
name A string that is the name of the cue point for which to search.