User Guide

FLVPlayback class 593
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 cuePt:Object = new Object(); //create cue point object
cuePt.time = 6.27;
cuePt.name = "transition";
cuePt.type = "actionscript";
my_FLVPlybk.addASCuePoint(cuePt); //add AS cue point
cuePt.time = 7.06;
my_FLVPlybk.addASCuePoint(cuePt); //add AS cue point
cuePt.time = 11.13;
my_FLVPlybk.addASCuePoint(cuePt); //add AS cue point
var listenerObject:Object = new Object();
listenerObject.ready = function():Void {
var rtn_obj:Object = new Object();
// Find cue point using name string
if (rtn_obj = my_FLVPlybk.findCuePoint("transition")) {
trace("Cue point name is: " + rtn_obj.name);
trace("Cue point time is: " + rtn_obj.time);
trace("Cue point type is: " + rtn_obj.type);
findNextName(rtn_obj);
}
}
my_FLVPlybk.addEventListener("ready", listenerObject);
// Find additional cue points with the same name
function findNextName(cuePt:Object):Void {
while(cuePt = my_FLVPlybk.findNextCuePointWithName(cuePt)) {
trace("Cue point name is: " + cuePt.name);
trace("Cue point time is: " + cuePt.time);
trace("Cue point type is: " + cuePt.type);
}
}
See also
FLVPlayback.addASCuePoint(), FLVPlayback.cuePoints,
FLVPlayback.findCuePoint(), FLVPlayback.findNearestCuePoint(),
FLVPlayback.isFLVCuePointEnabled(), FLVPlayback.removeASCuePoint(),
FLVPlayback.seekToNavCuePoint(), FLVPlayback.seekToNextNavCuePoint(),
FLVPlayback.seekToPrevNavCuePoint(), FLVPlayback.setFLVCuePointEnabled()