[Flash MX 2004] Stop Video playback when going to next frame

Hi,

I’ve put together a small website and have managed to teach myself quite a bit but there is one thing that I can’t seem to find any info on, so if anyone out there could help me out that would be great…

on the second page of the site I have a video, which progressively loads into the page, however I would like to make the video stop playing when you go to any of the other pages of the site. I’m sure this is a pretty straight forward piece of code but I can’t work it out myself.

This is the code I use to start my video playing…

var nc:NetConnection = new NetConnection();
nc.connect(null);

var ns:NetStream = new NetStream(nc);

myVideo.attachVideo(ns);

ns.play(“vsshowreel.flv”);

the button you click on to go to the other page is called resume_btn

I hope someone can help.

Thanks for reading this…