I have a sound object that I want to control independently of other sounds in my movie. I created a volume button, but it is affecting all sound in the movie. Am I doing something wrong? Here is the volume button script. BTW the other sounds in the movie are not sound objects, they’re in the timeline.
_root.musicLoop_snd = new Sound(musicLoop_snd);// Create sound object
_root.musicLoop_snd.attachSound(“FPOmusicLoop.aif”);// Attach library sound to object
_root.musicLoop_snd.start();//Play sound
_root.musicLoop_snd.setVolume(30);
// PAUSE/PLAY
var loopPlaying = “loopOn”;
sound_mc.onRelease = function() {
if(_root.loopPlaying==“loopOn”){ // These happen on PAUSE
_root.sound_mc.gotoAndStop(“paused”);
_root.loopPlaying=“loopOff”;
_root.musicLoop_snd.setVolume(0);
} else if(_root.loopPlaying==“loopOff”){ // These happen on PLAY
_root.sound_mc.gotoAndStop(“playing”);
_root.loopPlaying=“loopOn”;
_root.musicLoop_snd.setVolume(30);
}
};
sound_mc.onRollOver = function() {
if(_root.loopPlaying==“loopOn”){
_root.sound_mc.gotoAndStop(“playingOver”);
} else if(_root.loopPlaying==“loopOff”){
_root.sound_mc.gotoAndStop(“pausedOver”);
}
};
sound_mc.onRollOut= function() {
if(_root.loopPlaying==“loopOn”){
_root.sound_mc.gotoAndStop(“playing”);
} else if(_root.loopPlaying==“loopOff”){
_root.sound_mc.gotoAndStop(“paused”);
}
};