ActionScript 2.0 Components Language Reference |
|
|
|
| FLVPlayback Component > FLVPlayback class > FLVPlayback.fastForward | |||
Flash Player 8.
Flash Professional 8.
varlistenerObject:Object = new Object();listenerObject.fastForward = function(eventObject:Object):Void {// insert event-handling code here}; my_FLVplybk.addEventListener("fastForward",listenerObject);
Event; dispatched when the location of the playhead moves forward by seeking, either manually or through ActionScript, or by clicking the ForwardButton control. The event object has the properties state, playheadTime, and vp. The playheadTime property reflects the destination time, and the vp property is the index number of the video player to which the event applies.
The FLVPlayback instance also dispatches the seek and playheadUpdate events.
The following example catches occurrences of the fastForward event as it occurs and shows the elapsed playhead time in the Output panel. When the ready event occurs, a call to the seekPercent() method triggers the fastForward event.
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.ready = function(eventObject:Object):Void {
my_FLVPlybk.seekPercent(35);
};
my_FLVPlybk.addEventListener("ready", listenerObject);
listenerObject.fastForward = function(eventObject:Object):Void {
trace("fastforward event; playhead time is: " + eventObject.playheadTime);
};
my_FLVPlybk.addEventListener("fastForward", listenerObject);
my_FLVPlybk.contentPath = "http://www.helpexamples.com/flash/video/water.flv";
FLVPlayback.activeVideoPlayerIndex, FLVPlayback.forwardButton, FLVPlayback.seek, FLVPlayback.seek(), FLVPlayback.seekBar, FLVPlayback.seekPercent(), FLVPlayback.seekSeconds(), FLVPlayback.seekToNavCuePoint(), FLVPlayback.seekToNextNavCuePoint(), FLVPlayback.seekToPrevNavCuePoint(), FLVPlayback.seekToPrevOffset, FLVPlayback.state, FLVPlayback.playheadTime
|
|
|
|