PDA

View Full Version : sounds loop



strong-storm
June 29th, 2004, 08:04 AM
I have AS :

function getupvol() {
vol = music.getVolume();
if (vol<100) {
musicVol = (vol+1);
music.setVolume(musicVol);
} else {
clearInterval(music_id);
}
}
var music = new Sound();
music.onLoad = function(musiclOK) {
if (musiclOK) {
music.setVolume(0);
music_id = setInterval(getupvol, 50);
music.start(0,2000);
}
};
music.loadSound("sound.mp3", false);


But I don't understand why the sound stop after first loop, then wait few mili seconds and then play again !!! SO the problem is why this AS don't play music instantly after previous loop??? :sigh: