User Guide
626 FLVPlayback Component (Flash Professional Only)
Usage
var listenerObject:Object = new Object();
listenerObject.playheadUpdate = function(eventObject:Object):Void {
// insert event-handling code here
};
my_FLVplybk.addEventListener("playheadUpdate", listenerObject);
Description
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.
Example
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";
See also
FLVPlayback.playheadTime, FLVPlayback.playheadUpdateInterval
FLVPlayback.playheadUpdateInterval
Availability
Flash Player 8.
Edition
Flash Professional 8.