I am currently working on a game in flash, and i want to change the volume of the background music using actionscript, without changing the volume of the effects. This is what i have:
musicSound = new Sound(this.myClip);
musicSound.attachSound("song");
musicSound.start(0,999999);
musicSound.setVolume(10);
effectsSound = new Sound(this.myClip2);
effectsSound.attachSound("effect");
effectsSound.start(0,1);
But the musicSound.setVolume seems to set the global volume to 10, rather than that sound object. I don't think that i quite get this.............
I did read about the soundTransform object, but it threw errors! Any help would be appreciated!
A computer always does what you tell it to, but rarely does what you want it to.....
musicSound = new Sound(this.myClip);
musicSound.attachSound("song");
musicSound.start(0,999999);
musicSound.setVolume(10);
effectsSound = new Sound(this.myClip2);
effectsSound.attachSound("effect");
effectsSound.start(0,1);
But the musicSound.setVolume seems to set the global volume to 10, rather than that sound object. I don't think that i quite get this.............
I did read about the soundTransform object, but it threw errors! Any help would be appreciated!
A computer always does what you tell it to, but rarely does what you want it to.....