FLV playback problem
Hi!
I have a FLV player which working correctly with that code below. It has a play_btn which stops and resumes the NetStream with the pause method. How can I give it a "third stage" to rewind the NetStream and play it again if it ends? Thx for Your help!
Robert
Here is the code:
katt_btn._visible = false;
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
emb_video.attachVideo(ns);
ns.play("movie.flv");
ns.onStatus = function(info) {
if(info.code == "NetStream.Buffer.Flush") {
katt_btn._visible = true;
katt_btn.gotoAndPlay(1);
katt_btn.onRelease = function(){
getURL("http://index.html","_blank");
}
}
}
play_btn.onRelease = function () {
ns.pause();
if (this._currentframe == 1) {
this.gotoAndStop("pause");
}
else {
this.gotoAndStop("play");
}
}
|