Setting sound volume


I was wondering if anyone could tell me how I could go about setting the volume of sound, thats used on a button or as backround music.



do you know how to use the Sound object? (beep = new Sound()).

well, with the sound object, there’s a prototype for adjusting the volume. i think it’s like beep.setVolume(100); or something. i’ll look it up later.

After importing the music called songOne, (or whatever the file is named), add this ActionScript into the first frame of the layer where your music is:

backgroundMusic = new Sound();

If your music is in your main timeline, not located within another movie clip, insert this ActionScript into the button that you want to use to control volume:

on(release) {

So, when the user releases the button, the volume of backgroundMusic becomes half of what it started out as, assuming that it starts out at the default of 100.

The backgroundMusic name is just something to address your “sound object” with. It can be anything. If I remember correctly, the tutorial in Flash help just uses the letter s.