Originariamente inviato da pippo26
guardando quà e la nei vecchi post ho ricostruito questo script...funziona:
Sou=new Sound(this);
Sou.attachSound("loop");
Sou.start(0,1);
Sou.onSoundComplete = function ()
Sou.attachSound("loop2");
Sou.start(0,999);
}
adesso però non riesco a modificarlo per far in modo che la prima volta che parte la seconda traccia, questa inizi sfumando da 0 a 100 e poi continui in loop a 100...è possibile?
Grazie
prova così:
codice:
Sou.setVolume(100);
Sou = new Sound(this);
Sou.attachSound("loop");
Sou.start(0, 1);
Sou.onSoundComplete = function() {
Sou.attachSound("loop2");
Sou.start(0, 999);
Sou.setVolume(0);
alzaVolume();
};
function alzaVolume() {
volume = 0;
this.onEnterFrame = function() {
if (volume<=100) {
Sou.setVolume(volume);
volume += 3;
} else {
delete this.onEnterFrame;
}
};
}