
PHP код:
var setCont:Number;
function SoundVolume (UpDown:String) {
if (UpDown == "UP") {
BgSound.setVolume (setCont);
if (setCont >= 100) {
clearInterval (Volume);
} else {
setCont++;
}
} else if (UpDown == "DOWN" || UpDown == "OVER") {
BgSound.setVolume (setCont);
trace (BgSound.getVolume ());
if (setCont <= 0) {
if (UpDown == "OVER") {
BgSound.stop ();
clearInterval (Volume);
}
clearInterval (Volume);
} else {
setCont--;
}
}
}
BgSound.loadSound ("musik.mp3", true);
play.onRelease=function(){
Volume = setInterval (SoundVolume, 100, "UP");
}
stop.onRelease=function(){
Volume = setInterval (SoundVolume, 100, "OVER");
}
volumeof.onRelease=function(){
Volume = setInterval (SoundVolume, 100, "DOWN");
}
Где то я не давно писал, искать не пробовал... я вот не помню какой именно пост.. ну в общем примерно так.