balroo
August 7, 2003, 9:38am
1
hi there,
ive just tried a tutorial of Kirupa for a volume slide feature, take a look:
http://www.kirupa.com/developer/mx/volume_slider.htm
basically ive done it succesfully except for knowing afterwards that it was being aimed at one partucular sound loop…
is there any adjustment or anything i need to do in order to make this volume slider adjust the volume for all sounds within the swf file??
could someone help me out,…i would really appreciate it!!
thnx in advance!!
system
August 8, 2003, 4:55pm
2
Well, I don’t think you can use something like SetGlobalVolume or anything, so try this:
[AS]
onClipEvent (load) {
mySound = new Sound();
mySound.loadSound(“sound2.mp3”, false);
}
onClipEvent (enterFrame) {
downloaded = mySound.getBytesLoaded();
total = mySound.getBytesTotal();
if (downloaded != total) {
_root.dl = “downloading song…”;
} else {
complete = 1;
_root.dl = “”;
}
mySound.setVolume(_root.volume);
sound2.setVolume(_root.volume);
sound3.setVolume(_root.volume);
sound4.setVolume(_root.volume);
sound5.setVolume(_root.volume);
//Add all sound objects here to control their volume.
}
[/AS]
system
August 8, 2003, 5:10pm
3
You actually can use a global to set all the sound volumes i believe. If you just create a new global sound object and dont attach it to anything, controlling the volume on that object should control all the others.