Skip to main content
Participant
January 23, 2021
Question

Disable click event of other buttons while playing a button sound

  • January 23, 2021
  • 1 reply
  • 308 views

I am creating a simple interactive exe by animate cc 2019. Now I have 5 buttons layer in a scene, there are animated movie clip inside the button and each button's down state had inserted a VO sound over 10s. long.

Here I got a problem that when one of the button clicked and playing the sound, I can still click other buttons which lead to multiple sound playing at the same time. I can't find a script or any way to stop the mouse click event of other buttons until the VO sound is completed. The simplest way seems to disable the other button clicks. And then return to normal when the sound complete.

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
January 23, 2021

use movieclip buttons so you can control their behavior.

 

but you might be able to do what you want with the global createjs.Sound.stop() and stop all sounds.