// ActionScript 3.0
/* Requires
* - FLVPlayback control in Flash library
*/
import fl.video.FLVPlayback;
import fl.video.MetadataEvent;
import fl.video.*;
var flvPlayback:FLVPlayback = new FLVPlayback();
flvPlayback.autoPlay = false;
flvPlayback.addEventListener(MetadataEvent.METADATA_RECEIVED, flvPlayback_metadataReceived);
flvPlayback.addEventListener(VideoEvent.READY, flvPlayback_ready);
flvPlayback.addEventListener(MetadataEvent.CUE_POINT, flvPlayback_cuePoint);
flvPlayback.source = "http://www.helpexamples.com/flash/video/cuepoints.flv";
flvPlayback.skin = "SkinOverPlaySeekMute.swf";
flvPlayback.x = 10;
flvPlayback.y = 10;
addChild(flvPlayback);
function flvPlayback_metadataReceived(evt:MetadataEvent):void {
trace("duration:", evt.info.duration); // 16.334
trace("framerate:", evt.info.framerate); // 15
trace("width:", evt.info.width); // 320
trace("height:", evt.info.height); // 213
}
function flvPlayback_ready(evt:VideoEvent):void {
flvPlayback.addASCuePoint(1, "cuePoint1");
}
function flvPlayback_cuePoint(evt:MetadataEvent):void {
trace("CUE POINT!!!");
trace("\t", "name:", evt.info.name); // name: cuePoint1
trace("\t", "time:", evt.info.time); // time: 1
trace("\t", "type:", evt.info.type); // type: actionscript
}