# Why doesn't my flvplayer pause with a class?

**URL:** https://forum.kirupa.com/t/why-doesnt-my-flvplayer-pause-with-a-class/255628
**Category:** Uncategorized
**Created:** [March 25, 2008, 2:02pm UTC](https://forum.kirupa.com/t/why-doesnt-my-flvplayer-pause-with-a-class/255628 "2008-03-25T14:02:48Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![keitai](https://avatars.discourse-cdn.com/v4/letter/k/73ab20/32.png) [@keitai](https://forum.kirupa.com/u/keitai)
#### Post date: [March 25, 2008, 2:02pm UTC](https://forum.kirupa.com/t/why-doesnt-my-flvplayer-pause-with-a-class/255628/1 "2008-03-25T14:02:48Z")

</div>

```auto

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

```auto

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
