I’m using cuepoints on a video to determine when, and for how long, animated graphics (visor_mc) should appear underneath the video (it’s a training video).
Using the code below I can get this to work, but the animations don’t play, they just show the closing graphic at the end of the animation.
It seems as if the animation has finished by the time it comes to be added to the stage. Setting the animation to loop doesn’t help.
Anybody know how to be sure the animation doesn’t start until the cue point triggers it?
var visor = new visor_mc();
// Requires an FLVPlayback instance called my_FLVPlybk on Stage import fl.video.*;
import fl.video.MetadataEvent;
my_FLVPlybk.source = "Cheryl.flv"
my_FLVPlybk.addASCuePoint(89,"visor");
my_FLVPlybk.addASCuePoint(94,"visor2");
my_FLVPlybk.addEventListener(MetadataEvent.CUE_POINT, addGraphic );
function addGraphic(pEvent:MetadataEvent)
{
if(pEvent.info.name == "visor")
{
addChild(visor);
}
if(pEvent.info.name == "visor2")
{
removeChild(visor);
}
}