ActionScript 2.0 Components Language Reference |
|
|
|
| FLVPlayback Component > FLVPlayback class > FLVPlayback.ready | |||
Flash Player 8.
Flash Professional 8.
varlistenerObject:Object = new Object();listenerObject.ready = function(eventObject:Object):Void{// insert event-handling code here}; my_FLVplybk.addEventListener("ready",listenerObject);
Event; dispatched when FLV file is loaded and ready to display. It starts the first time you enter a responsive state after you load a new FLV file with the play() or load() method. It starts only once for each FLV file that is loaded.
The event object has the state, playheadTime, and vp properties. The vp property is the index number of the video player to which this event applies. For more information on the vp property, see FLVPlayback.activeVideoPlayerIndex and FLVPlayback.visibleVideoPlayerIndex.
/**
Requires:
- FLVPlayback component on the Stage with an instance name of my_FLVPlybk
- TextArea component on the Stage with an instance name of my_ta
*/
import mx.video.*;
my_ta.visible = false;
my_FLVPlybk.autoPlay = false;
my_ta.setSize(260, 30);
var listenerObject:Object = new Object();
listenerObject.ready = function(eventObject:Object):Void {
my_ta.text = "The FLV is ready. Push Play to start playing";
my_ta.visible = true;
};
my_FLVPlybk.addEventListener("ready", listenerObject);
my_FLVPlybk.contentPath = "http://www.helpexamples.com/flash/video/water.flv";
FLVPlayback.activeVideoPlayerIndex, FLVPlayback.addEventListener(), FLVPlayback.state, FLVPlayback.visibleVideoPlayerIndex
|
|
|
|