Hi!
I am trying to make a volume control in my flash movie with actionscript 2.0
Here is my code:
var s : Sound = new Sound();
var volPos : Number = 20;
s.setVolume(volPos);
btBaixa.onRelease = function()
{
if(volPos > 0){
volPos -= 10;
}
s.setVolume(volPos);
}
btAumenta.onRelease = function()
{
if(volPos < 100){
volPos += 10;
}
s.setVolume(volPos);
}
but the problem is the first time I lanch my movie it comes in a good volume.As soon as I hit the up or down button to lower or increase the volume firts the volume goes down a lot and then starts to increase or decrease its volume.
What is wrong with it?