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

**URL:** <https://forum.kirupa.com/t/flash-mx-2004-stop-video-playback-when-going-to-next-frame/231855>\
**Category:** flash\
**Created:** [July 8, 2007, 11:46pm UTC](https://forum.kirupa.com/t/flash-mx-2004-stop-video-playback-when-going-to-next-frame/231855 "2007-07-08T23:46:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Spee](https://avatars.discourse-cdn.com/v4/letter/s/3bc359/32.png) [@Spee](https://forum.kirupa.com/u/Spee)\
**Post date:** [July 8, 2007, 11:46pm UTC](https://forum.kirupa.com/t/flash-mx-2004-stop-video-playback-when-going-to-next-frame/231855/1 "2007-07-08T23:46:39Z")

</div>

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…
