Mute or stopAllSounds not working


#1

Hi,

I’m trying to stop or mute sounds in my project with a button, but its not working at all.
I’ve made a button with 3 keyframes, the third is called mouseDown.
In the project I gave the button this code:
function mouseDown() {
stopAllSounds()
}
When I run the project, this does not work.
I tried the same with the mute function, but no effect…

Could it be a bug?

Regards,
Rienk


#2

Hi @rienk, we’ve found a bug that causes stopAllSounds() to not work if the sound is triggered on a frame. It should work if the sound is triggered through code using playSound("soundName").

We’ve logged this bug and aim to fix it in the next version of the Wick Editor.


#3

Thank you, I will use this new code.
Also I figured out that not all browsers handle these stop/start soundbuttons the same way.
On Chrome it works fine, for example, but on a iPad with Safari it is not good.
In my project the sound starts automatically and should stop with a button. On the iPad the sound doesn’t start but when I push the stop sound button, the sound starts!

Regards,
Rienk