class FlvPlayer {
public var videoURL:String;
public var theVideo:MovieClip;
public var nc:NetConnection;
public var ns:NetStream;
function FlvPlayer() {
nc = new NetConnection();
nc.connect(null);
ns = new NetStream(nc);
}
function playVideo():Void {
theVideo.attachVideo(ns);
ns.play(videoURL);
}
function rewindVideo():Void {
trace("rewind");
ns.seek(0);
}
function pauseVideo():Void {
trace("pause");
ns.pause();
}
}
and with
import FlvPlayer.as;
var flvplayer:FlvPlayer = new FlvPlayer();
flvplayer.theVideo = theVideoSkin;
flvplayer.videoURL = "test.flv";
flvplayer.playVideo();
rewindBtn.onRelease = flvplayer.rewindVideo;
pauseBtn.onRelease = flvplayer.pauseVideo;
Now it does play but it doesn’t rewind or pause but i do see the corresponding tracing messages???
Any idea