Código:
var mySound:Sound = new Sound(this);
mySound.attachSound(soundID);
myBtn.onRelease = function():Void{
fadeIn();
}
function fadeIn():Void{
var intervalo:Number = 5;
function subir():Void{
if (mySound.getVolume() >= 100) clearInterval(intervalID);
mySound.setVolume(mySound.getVolume() + intervalo);
}
var intervalID:Number = setInterval(subir, 100);
}
y haces casi lo mismo para una función que disminuya el volumen.