User Guide
FLVPlayback class 629
FLVPlayback.playing
Availability
Flash Player 8.
Edition
Flash Professional 8.
Usage
var :Object = new Object();
listenerObject.playing = function(eventObject:Object):Void {
// insert event-handling code here
};
my_FLVplybk.addEventListener("playing", listenerObject);
Description
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
on page 549 and
FLVPlayback.visibleVideoPlayerIndex on page 688.
The FLVPlayback instance also dispatches the
stateChange event.
Example
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";