User Guide
666 FLVPlayback Component (Flash Professional Only)
Example
The following example initially sets the seekToPrevOffset property to 10, causing the first
call to the
seekToPrevNavCuePoint() method to hit cue point point1. When the initial
cuePoint event for point3 occurs, however, the example lowers the seekToPrevOffset
property to 1 second, causing subsequent calls to the
seekToPrevNavCuePoint() method to
reach cue point point2.
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.*;
my_FLVPlybk.contentPath = "http://www.helpexamples.com/flash/video/
cuepoints.flv";
var listenerObject:Object = new Object();
listenerObject.ready = function(eventObject:Object) {
my_FLVPlybk.seekToPrevOffset = 10;
my_FLVPlybk.seekToNavCuePoint("point3");
}
my_FLVPlybk.addEventListener("ready", listenerObject)
var listenerObject:Object = new Object();
listenerObject.cuePoint = function(eventObject:Object) {
trace("hit cue point at " + eventObject.info.time);
if(eventObject.info.name == "point3"){
my_FLVPlybk.seekToPrevNavCuePoint(eventObject.info.time);
my_FLVPlybk.seekToPrevOffset = 1;
}
}
my_FLVPlybk.addEventListener("cuePoint", listenerObject)
See also
FLVPlayback.seekToPrevNavCuePoint()
FLVPlayback.setFLVCuePointEnabled()
Availability
Flash Player 8.
Edition
Flash Professional 8.