Hi I can’t get this code to control my flv. Even when I comment out the cue point code and try to just control it with buttons. I’m getting a bit frustrated. Can someone please critique my code?
The flv is called: fishing_intro.flv
the playback component: myFLVPlayback
I’m trying to have my entire .swf operate around the cue points of the movie - for example I’d like to have tweens start when it reaches a mid point and the .flv to stop, and a new load movie at the end of the .flv when it starts playing again (using a variable to start play). I’d eventually like to add an interactive preloader. I’ve gotten all of the cue points to work, but I just can’t get the actual control of the .flv to work. Am I doing anything wrong?
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
myFLVPlayback.attachVideo(ns);
ns.play("fishing_intro.flv");
// just for testing
playButton.onRelease = function () {
ns.pause();
}
var listenerObject:Object = new Object();
listenerObject.cuePoint = function(eventObject:Object):Void {
var cuePointName = eventObject.info.name;
// cue point start
if (cuePointName == "start") {
trace("flv begins playing");
// stop playing
ns.pause();
}
}