# Removing a Video from the Stage

**URL:** <https://forum.kirupa.com/t/removing-a-video-from-the-stage/312338>\
**Category:** flash\
**Created:** [July 31, 2010, 12:34am UTC](https://forum.kirupa.com/t/removing-a-video-from-the-stage/312338 "2010-07-31T00:34:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajm97210](https://avatars.discourse-cdn.com/v4/letter/a/d07c76/32.png) [@ajm97210](https://forum.kirupa.com/u/ajm97210)\
**Post date:** [July 31, 2010, 12:34am UTC](https://forum.kirupa.com/t/removing-a-video-from-the-stage/312338/1 "2010-07-31T00:34:51Z")

</div>

So I have a 5 page website, on the home page when I opens you see a video and it automatically plays. When you click to a different page though you can still hear the sound in the background. The video has an instance name of video, I tried using video.stop(); in the code for each button and it works but then it doesn’t allow me to navigate when it isn’t away from the home page.

Here is the code I have for one of my buttons (it’s the same for the others with different names though):

home\_btn.addEventListener(MouseEvent.CLICK, gotoFrame);

function gotoFrame(e:MouseEvent):void  
{  
if(e.target.name == “home\_btn”)  
{  
gotoAndPlay(“home”);  
}  
}

Do I have to use an else statement or another if statement? I have no idea what to do here, please help!
