hi everyone
i’m working on a flash game at the moment which uses a few sound objects in one movieclip.
eg, when one sound is playing, and the time’s up, a buzzer sound should play.
but when i want to stop one sound and start another one, it seems that stopping that one sound is stopping all the sounds. it even seems to interfere with sounds in the movieclip which should play after the current one…
any ideas what could be the problem ?
here’s the code of the specific movieclip. here you see that the buzzer should start and the beat should stop. but when stopping the beat, the buzzer doesn’t even play. i tried with the volumeTo (mctween function) but that fades all the sounds, even the next ones in the next movieclip.
it’s getting quite frustrating really
stop();
buzzer = new Sound();
buzzer.attachSound("buzzer");
buzzer.setVolume(100);
beat = new Sound();
beat.attachSound("beat");
beat.setVolume(100);
beat.start();
//Maak het interval aan
function gotoScreen(){
trace("goto");
gotoAndPlay("freeze");
}
function count() {
// trace("Seconds left: "+lengte);
lengte--;
teller_mc.teller.text = lengte;
if (lengte == 0) {
buzzer.start();
// beat.volumeTo(0,0.1,"Linear",0.5);
//beat.setVolume(0);
beat.stop();
teller_mc.teller.text = "0";
// de "game over mc" visible maken
gameOver._visible = true;
//ofwel naar de root gaan en de eind animatie laten zien
//
//evt nog de ballen van de stage verwijderen ?
ballenKader.removeBalls();
//de teller stoppen
clearInterval(countInterval);
screenInterval = setInterval(gotoScreen(), 90000);
}
}
countInterval = setInterval(count, 1000);
thanx!