Anyone out there an expert in cue points?
I’m using this code to add cue points to a flash video and I want library items to appear/disappear at the specified points.
Can anybody point me to the next stage where I get the library item to appear between two cue points only?
hopingly …
import fl.video.*;
import fl.video.MetadataEvent;
my_FLVPlybk.source = "acc.flv"
var cuePt:Object = new Object(); //create cue point object
cuePt.time = 2.02;
cuePt.name = "one";
cuePt.type = "actionscript";
my_FLVPlybk.addASCuePoint(cuePt);//add AS cue point
// add 2nd AS cue point using time and name parameters
my_FLVPlybk.addASCuePoint(5, "two");
my_FLVPlybk.addASCuePoint(10, "three");
my_FLVPlybk.addEventListener(MetadataEvent.CUE_POINT, cp_listener);
function cp_listener(eventObject:MetadataEvent):void {
//trace("Elapsed time in seconds: " + my_FLVPlybk.playheadTime);
//trace("Cue point name is: " + eventObject.info.name);
//trace("Cue point type is: " + eventObject.info.type);
if (eventObject.info.name == "one"){
// library item to appear on stage
}
}