# Stopping sound from video

**URL:** <https://forum.kirupa.com/t/stopping-sound-from-video/296893>\
**Category:** flash\
**Created:** [September 22, 2009, 12:07pm UTC](https://forum.kirupa.com/t/stopping-sound-from-video/296893 "2009-09-22T12:07:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![m\_h\_w](https://avatars.discourse-cdn.com/v4/letter/m/58956e/32.png) [@m\_h\_w](https://forum.kirupa.com/u/m_h_w)\
**Post date:** [September 22, 2009, 12:07pm UTC](https://forum.kirupa.com/t/stopping-sound-from-video/296893/1 "2009-09-22T12:07:18Z")

</div>

Ok ill try to explai my problem.

In my website i have some videos. When i import the video.swf to my main swf. everything works fine.  
But if i navigate away from the video part the video goes away but the sound keeps playing.

I dont want to use the flash.media.SoundMixer.stopAll() function becasue  
i have a jukebox player that i want to work inbetween. and dotn want it to stop when you navigate the menu. It only stops when you go to Videos.

Here is the code i use:

* * *

var image:Loader = new Loader();  
addChild(image);  
image.x = 95;  
image.y = 146;

function setContent(imageUrl:String):void {  
var url:URLRequest = new URLRequest(imageUrl);  
image.load(url);  
}

videos\_btn.addEventListener(MouseEvent.CLICK, onVideosClick);  
news\_btn.addEventListener(MouseEvent.CLICK, onNewsClick);

function onVideosClick(event:MouseEvent=null):void {  
flash.media.SoundMixer.stopAll()  
setContent(“Videos.swf”);  
}

function onNewsClick(event:MouseEvent=null):void {  
setContent(“News.swf”);  
}

* * *

What can i put in the news button to make the sound from the video stop.

Cheers

- Martin
