ActionScript 2.0 Components Language Reference |
|
|
|
| FLVPlayback Component > FLVPlayback class > FLVPlayback.playing | |||
Flash Player 8.
Flash Professional 8.
var :Object = new Object();listenerObject.playing = function(eventObject:Object):Void {// insert event-handling code here}; my_FLVplybk.addEventListener("playing",listenerObject);
Event; dispatched when the playing state is entered. This may not occur immediately after the play() method is called or the corresponding control is clicked; often the buffering state is entered first, and then the playing state. The event object has the state, playheadTime, and vp properties, which 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.
The FLVPlayback instance also dispatches the stateChange event.
The following example shows the value of the contentPath property in a text area when the playing event occurs.
Drag an FLVPlayback component to the Stage, and give it an instance name of my_FLVPlybk. Drag a TextArea component to the Stage below the FLVPlayback instance, and give it an instance name of my_ta. Then add the following code to Frame 1 of the Timeline in the Actions panel:
/**
Requires:
- FLVPlayback component on the Stage with an instance name of my_FLVPlybk
*/
import mx.video.*;
var listenerObject:Object = new Object();
listenerObject.playing = function(eventObject:Object):Void {
my_ta.text = "Now playing: " + my_FLVPlybk.contentPath;
}
my_FLVPlybk.addEventListener("playing", listenerObject);
my_FLVPlybk.contentPath = "http://www.helpexamples.com/flash/video/water.flv";
FLVPlayback.play(),FLVPlayback.playing, FLVPlayback.state, FLVPlayback.stateChange
|
|
|
|