AS2 Volume Control

Hello Im very new to Flash in general and I found this tutorial very helpful:

http://www.kirupa.com/developer/mx/volume_slider.htm

I was able to follow the tutorial and the file worked perfectly on my site. However, I would like to know how to make the MP3 start at 100 level and give the listener the option to lower the volume. The way the tutorial is set up the volume begins at 0. Here is the way the code looks now.

[FONT=Courier New][SIZE=2] onClipEvent (load) {[/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#808080]
[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#ff6600] mySound = new Sound();
mySound.loadSound(“sound2.mp3”, false);[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#808080]
[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2]}[/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#808080]
[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2]onClipEvent (enterFrame) {[/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#808080]
[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#336600] downloaded = mySound.getBytesLoaded();
total = mySound.getBytesTotal();
if (downloaded != total) {
_root.dl = “downloading song…”;
} else {
complete = 1;
_root.dl = “”;
}[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#808080]
[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff] mySound.setVolume(_root.volume);[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#808080]
[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2]}[/SIZE][/FONT]

Thanks!!

anybody? help!:angel:

Your code only loads the mp3.

To control the volume you have to create a slider or some buttons so that the user can change the volume.

Here you will find all the info you need to know about the sound object on AS2

http://www.kennybellew.com/tutorial/

BTW if you’re new to AS I recommend you to skip AS2 and go straight to AS3 because AS2 will die soon.