Volume control in flash.

3 posts

Flag Post

Ok, I don’t want a slider. I want arrows. I tried using this code:

on(release) {
volume = volume – 10;
if(volume<0) volume = 0;
music.setVolume(volume);
}

but it didn’t work. What do I have to do?

 
Flag Post

I haven’t even started coding flash yet, but Isn’t Music in mixed case?

I know flash is a case sensitive language, and I think that is the problem.
As well comment out the if(volume<0) volume = 0; section and see if that helps. (deal with the error checking after you get it working)

As well it would be a good design feature that when you set the volume to 0 it would disable the volume down button until they turn on the volume again. and vica versa.

 
Flag Post

maybe?


on(release) {
_root.volume = _root.volume – 10; if(volume<0)
_root.volume = 0; root.music.setVolume(root.volume);
}