Example
The following example assumes playing a streaming FLV file from a FCS or FVSS. The
example sets the
idleTimeout
timeout and, consequently, a
event shows the index number of the video player for which the event occurred.
close
Drag an FLVPlayback component to the Stage, and give it an instance name of
my_FLVPlybk. In the Component inspector, assign the
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
A number that is the time, in seconds, of the cue point for which to search.
time
A string that is the name of the cue point for which to search.
name
property to a low value of 10 milliseconds, which triggers a
event on the RTMP connection. The listener for the
close
parameter a value that
contentPath
FLVPlayback class
599
Need help?
Do you have a question about the FLASH 8-COMPONENTS LANGUAGE and is the answer not in the manual?
Questions and answers