When video ends go to timeline label
Hi Everyone
I am using this code to play a video when a user clicks on a button:
function clicked(event:MouseEvent):void {
var video:Video = new Video();
addChild(video);
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
ns.client = {onMetaData:ns_onMetaData, onCuePoint:ns_onCuePoint};
video.attachNetStream(ns);
ns.play("video.flv");
function ns_onMetaData(item:Object):void {
trace("metaData");
video.width = item.width;
video.height = item.height;
video.x = (stage.stageWidth - video.width) / 2;
video.y = (stage.stageHeight - video.height) / 2;
}
}
When the video ends I want to go to another part of the timeline. How can I do this?
Hope someone can help!
Many thanks!