# Stopping music also stops other sound FX problem

**URL:** <https://forum.kirupa.com/t/stopping-music-also-stops-other-sound-fx-problem/220770>\
**Category:** flash\
**Created:** [March 29, 2007, 2:12am UTC](https://forum.kirupa.com/t/stopping-music-also-stops-other-sound-fx-problem/220770 "2007-03-29T02:12:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![artavenir](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/artavenir/32/3400_2.png) [@artavenir](https://forum.kirupa.com/u/artavenir)\
**Post date:** [March 29, 2007, 2:12am UTC](https://forum.kirupa.com/t/stopping-music-also-stops-other-sound-fx-problem/220770/1 "2007-03-29T02:12:09Z")

</div>

Hi,

I got this script for a music on/off. Problem is that when I stop the music it also turns off all the other sound on my main timeline as well as sound FX for my buttons.

How do you set this without affecting all the other sound?

THANKS!

> 

onClipEvent (load)  
{  
\_root.soundstatus = “on”;  
\_root.mySound = new Sound(\_level0);  
\_root.mySound2 = new Sound(\_level1);  
\_root.mySound3 = new Sound(\_level2);  
\_root.mySound4 = new Sound(\_level3);  
\_root.mySound5 = new Sound(\_level4);  
maxvolume = 100;  
minvolume = 0;  
}  
onClipEvent (enterFrame)  
{  
if (\_root.soundstatus == “on”)  
{  
step = 5;  
} // end if  
if (\_root.soundstatus == “off”)  
{  
step = -5;  
} // end if  
maxvolume = maxvolume + step;  
if (maxvolume \> 100)  
{  
maxvolume = 100;  
} // end if  
if (maxvolume \< 0)  
{  
maxvolume = 0;  
} // end if  
\_root.mySound.setVolume(maxvolume);  
\_root.mySound2.setVolume(maxvolume);  
\_root.mySound3.setVolume(maxvolume);  
\_root.mySound4.setVolume(maxvolume);  
\_root.mySound5.setVolume(maxvolume);  
}
