ActionScript 2.0 Components Language Reference |
|
|
|
| FLVPlayback Component > FLVPlayback class > FLVPlayback.isRTMP | |||
Flash Player 8.
Flash Professional 8.
my_FLVPlybk.isRTMP
Property; a Boolean value that is true if the FLV file is streaming from a FMS or FVSS using RTMP. Its value is false for any other FLV file source. Read-only.
The following example assumes playing a streaming FLV file from a FMS or FVSS. When the playing event occurs, the example shows the value of the isRTMP property to indicate whether the FLV file is coming from an RTMP URL.
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. In the statement that loads the contentPath property, replace the italicized text with the name and location of an FLV file on your FMS.
/**
Requires:
- FLVPlayback component on the Stage with an instance name of my_FLVPlybk
*/
import mx.video.*;
my_FLVPlybk.bufferTime = 7;
var listenerObject:Object = new Object();
// listen for playing event on RTMP connection; display result of isRTMP
listenerObject.playing = function(eventObject:Object) {
trace("Value of isRTMP property is: " + my_FLVPlybk.isRTMP);
};
my_FLVPlybk.addEventListener("playing", listenerObject);
my_FLVPlybk.contentPath = "rtmp://my_servername/my_application/stream.flv";
FLVPlayback.contentPath, FLVPlayback.load(), FLVPlayback.play()
|
|
|
|