Sound... setVolume affects an ambient sound?

Greetings.

I have recently added a few sounds to my flash application (http://www.sportal.de/tracker/tracker.html) with several sound handlers being set off by pressing buttons and the like.

It works like this:[AS]_root.mySound2 = new Sound();
_root.mySound2.attachSound(“beep”);
_root.mySound2.setVolume(Number(_root.setvolumes[“Day”][0]));
_root.mySound2.start();[/AS](where the “setvolumes” array holds 2 values for each sound I’m using… the first is one [0] that gets overridden depending on whether it’s on or off [volume = 0], the second value holds the original volume that it’s set to when the sound is switched on again).

When the sounds are switched off, there’s a loop that overrides the first value for each sounds’ array entry with 0, when it is switched on again, the first value of each sounds’ array entry is overridden with it’s second value.

Then, when any sound is triggered, it retrieves the value from the first array entry that belongs to that sound.

Like I said- that works nicely. BUT- when I added an ambience sound that just keeps on looping, I get a problem when other sounds are triggered.

The starting of the Ambience sound looks like this:[AS]_root.mySoundAmb = new Sound();
_root.mySoundAmb.attachSound(“ambience”);
_root.mySoundAmb.setVolume(Number(_root.setvolumes[“Amb”][0]));
_root.mySoundAmb.start(0,999);[/AS]…so to the best of my understanding, it has it’s own “handler” (mySoundAmb), right? It shouldn’t be affected by "setVolume"s applied to other sound handlers, right?

But when I trigger another sound while the ambient sound is running, the ambient sound is set to the volume of that particular sound as well… does anyone know why that is so?

I’ll try to derive the portions of code that generate this phenomenon, in case some of you have a clue but need to see code :slight_smile: …but if someone can answer this question without having to see the code, that would be even better :smiley:

Thanks!
~Marcel