ActionScript 2.0 Components Language Reference |
|
|
|
| FLVPlayback Component > FLVPlayback class > FLVPlayback.playheadUpdate | |||
Flash Player 8.
Flash Professional 8.
varlistenerObject:Object = new Object();listenerObject.playheadUpdate = function(eventObject:Object):Void {// insert event-handling code here}; my_FLVplybk.addEventListener("playheadUpdate",listenerObject);
Event; dispatched while the FLV file is playing at the frequency specified by the playheadUpdateInterval property. The default is .25 seconds. The component does not dispatch this event when the video player is paused or stopped unless a seek occurs. The event object has the state, playheadTime, and vp properties.
The following example catches occurrences of the playheadUpdate event as it occurs while the FLV file plays and displays the elapsed playhead time in the Output panel.
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:
/**
Requires:
- FLVPlayback component on the Stage with an instance name of my_FLVPlybk
*/
import mx.video.*;
var listenerObject:Object = new Object();
listenerObject.playheadUpdate = function(eventObject:Object):Void {
trace(my_FLVPlybk.state + ": playhead time is: " + eventObject.playheadTime);
};
my_FLVPlybk.addEventListener("playheadUpdate", listenerObject);
my_FLVPlybk.contentPath = "http://www.helpexamples.com/flash/video/water.flv";
FLVPlayback.playheadTime, FLVPlayback.playheadUpdateInterval
|
|
|
|