Hello,
I am using actionscript to play sounds in my game. Here is the code I’m using for a gun firing when the user clicks:
var beretta:Sound = new Sound();
beretta.attachSound("gunshot");
beretta.start(0, 0);
That works fine. I also have a background sound that plays on a constant loop:
var tvstaticsound:Sound = new Sound();
tvstaticsound.attachSound("tvsound");
tvstaticsound.start (0, 999);
tvstaticsound.setVolume(5);
The above sound varies in volume depending on what room the player enters. I’m using the following code to alter the volume:
_root.tvstaticsound.setVolume(7);
The problem I’m having is that when the actionscript alters the volume of tvstaticsound, the beretta sound also gets changed to the same volume. What am I doing wrong? Surely only the audio I’ve specified should have its volume changed?
Thank you.