Highlighted

Stop and play all sounds

Explorer ,
Feb 01, 2018

Copy link to clipboard

Copied

I know that there are several threads, but none was helpful for my question.

Since it is a very simple task, I am surprised about it:

In many Animate/Canvas animations sound is used. And in all of them it is a good practice to offer a button to the users to stop the sound.

createjs.Sound.stop(); does a good job only for the first sound playing. If there are more sounds set on keyframes of the timeline later, they will play. It means that the code only stops the currently playing sound.

How to manage to stop (play) all sounds of the animation???

Thanks in advance for help.

Adobe Community Professional
Correct answer by ClayUUID | Adobe Community Professional

Your thread title is not a good description of what you're actually trying to do. You're not wanting to stop and play all sounds, you're wanting to mute all sounds.

And what do you know, the SoundJS component of CreateJS offers exactly that.

createjs.Sound.muted = true;

Views

520

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Stop and play all sounds

Explorer ,
Feb 01, 2018

Copy link to clipboard

Copied

I know that there are several threads, but none was helpful for my question.

Since it is a very simple task, I am surprised about it:

In many Animate/Canvas animations sound is used. And in all of them it is a good practice to offer a button to the users to stop the sound.

createjs.Sound.stop(); does a good job only for the first sound playing. If there are more sounds set on keyframes of the timeline later, they will play. It means that the code only stops the currently playing sound.

How to manage to stop (play) all sounds of the animation???

Thanks in advance for help.

Adobe Community Professional
Correct answer by ClayUUID | Adobe Community Professional

Your thread title is not a good description of what you're actually trying to do. You're not wanting to stop and play all sounds, you're wanting to mute all sounds.

And what do you know, the SoundJS component of CreateJS offers exactly that.

createjs.Sound.muted = true;

Views

521

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Feb 01, 2018 0
Adobe Community Professional ,
Feb 01, 2018

Copy link to clipboard

Copied

Your thread title is not a good description of what you're actually trying to do. You're not wanting to stop and play all sounds, you're wanting to mute all sounds.

And what do you know, the SoundJS component of CreateJS offers exactly that.

createjs.Sound.muted = true;

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 01, 2018 2
Explorer ,
Feb 01, 2018

Copy link to clipboard

Copied

Sorry, I am neither programmer nor English native speaker 😉

But your hint was perfectly right.

Thank you

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 01, 2018 0
DECSC LATEST
New Here ,
Jan 24, 2020

Copy link to clipboard

Copied

 
How can I apply it? I have a movie clip as a button
createjs.Sound.stop();
Thanls a lot
 

 

createjs.Sound.stop();

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 24, 2020 0