Copiar link para a área de transferência
Copiado
I'm struggling with finding the right combination of code, or perhaps this is complete user error as I'm not a coder nor savvy in javascript... But I'm searching for a way to use a button to stop a looping sound from continuing after being clicked in a HTML5 canvas document. Upon click, the current movie clip animation stops (the video) and a new movie clip starts. Right now, the sounds are overlapping and the looped sound just doesn't stop.
Any help would be much appreciated!
// stop all sounds
createjs.Sound.stop();
Copiar link para a área de transferência
Copiado
// stop all sounds
createjs.Sound.stop();
Copiar link para a área de transferência
Copiado
I've tried that, and it does successfully stop the sounds, but I can't figure out how to trigger it on a button click. Any advice there?
Copiar link para a área de transferência
Copiado
Actually, through guessing... I figured it out!!! Thank you so much!
Copiar link para a área de transferência
Copiado
According to your first post you'd already figured out how to make things happen on a button click, but not how to stop all sounds. Now you're claiming the opposite of that.
Sigh.