all groups > flash actionscript > november 2006 >
You're in the

flash actionscript

group:

playing and pausing netStream



playing and pausing netStream JPD_0711
11/17/2006 10:39:55 PM
flash actionscript: Hi.

I'm creating a FLV player and I have both a pause and play button. I know if
I have one button I can use this to toggle between play and pause:

playButton.onRelease = function() {
ns.pause();
}

But if I have a playButton and a pauseButton, how do I make them perform the
functions individually?

thanks a bunch,

JP



Re: playing and pausing netStream CoDo
11/20/2006 10:48:15 AM
The ns.pause works like a toggle.

function pauseIt() {
ns.pause();
}

So when the video plays and you trigger the function pauseIt() it stops
and when it is paused, it start to play.
This works perfectly.
Here I use this: http://www.wijnhuisbest.nl/temp/index.htm

Don't mind the look, it is under construction.

Cor
Re: playing and pausing netStream arunbe
11/20/2006 2:05:29 PM
Hi,

To pause the NetStream use like this
NetStream_ns.pause(true);

To Play again the NetStream , use like this
NetStream_ns.pause(false);
AddThis Social Bookmark Button