# Controlling A Single Sound

**URL:** <https://forum.kirupa.com/t/controlling-a-single-sound/192389>\
**Category:** flash\
**Created:** [June 28, 2006, 9:14am UTC](https://forum.kirupa.com/t/controlling-a-single-sound/192389 "2006-06-28T09:14:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sprecks](https://avatars.discourse-cdn.com/v4/letter/s/ce73a5/32.png) [@sprecks](https://forum.kirupa.com/u/sprecks)\
**Post date:** [June 28, 2006, 9:14am UTC](https://forum.kirupa.com/t/controlling-a-single-sound/192389/1 "2006-06-28T09:14:58Z")

</div>

Hi. I have created a CD ROM and am trying to iron out this glitch with my sound. I have a sound clip (trains.wav) that is activated when I play a small animation. I have a Stop button and a play button for this sound. This animation and sound is contained in a movie clip where i have created the variables sound on and sound off on a layer. For each button i call on these variables to turn the sound to 0 or to 100. e.g:

layer code: var soundOff = new Sound(trains.wav);

button code: on(Release){  
soundOff.setVolume(0)  
}

This all works as expected. The problem is that I specify that the single sound is turned off as seen above, but when i go to play a video on a different movie clip, the sound is switched off here as well, and cant be turned on till i go back to the animation and click the sound on button? I really need help on code to toggle this one sound!
