Want to know how to add a cue point to FLV files? Well, it’s fairly straightforward. The trickiest part is creating the listener object. Check out the code below, or download the source file here:
http://www.designupdate.com/cuepoints.zip
my_FLVPlybk.contentPath = “http://www.helpexamples.com/flash/video/water.flv”;
//add 2 AS cue points
my_FLVPlybk.addASCuePoint(2, “first”);
my_FLVPlybk.addASCuePoint(4, “second”);
//create a listener object
var listenerObject:Object = new Object();
listenerObject.cuePoint = function(eventObject:Object):Void {
trace(“Here’s the name of the instance, as well as the cue point: “+eventObject.info.name);
//play the instance that has the same name as the cuepoint name
_root[eventObject.info.name].gotoAndPlay(2);
};
my_FLVPlybk.addEventListener(“cuePoint”, listenerObject);