vendredi 6 février 2015

How can I play sound directly after an other?

I would like to play a sound when I click on an image. But when I quickly click on it again, it doesn't play it again because the other is not finished. How can I adjust this?


My code:



var click;
click = new Audio("sound/ping.mp3")
click.volume = .75;

circle.on("click", handleMouseEventClick);

function handleMouseEventClick(evt){
click.play();
punten += 1;
score.text = "Score: " + punten;
stage.removeChild(this);
stage.update();
}


Thanks!


Aucun commentaire:

Enregistrer un commentaire