• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Animate CC audio controls using javascript on button click in HTML5 canvas

New Here ,
Nov 03, 2016 Nov 03, 2016

Copy link to clipboard

Copied

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!

Views

1.8K

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
community guidelines

correct answers 1 Correct answer

LEGEND , Nov 03, 2016 Nov 03, 2016

// stop all sounds

createjs.Sound.stop();

Votes

Translate

Translate
LEGEND ,
Nov 03, 2016 Nov 03, 2016

Copy link to clipboard

Copied

// stop all sounds

createjs.Sound.stop();

Votes

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
community guidelines
New Here ,
Nov 04, 2016 Nov 04, 2016

Copy link to clipboard

Copied

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?

Votes

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
community guidelines
New Here ,
Nov 04, 2016 Nov 04, 2016

Copy link to clipboard

Copied

Actually, through guessing... I figured it out!!! Thank you so much!

Votes

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
community guidelines
LEGEND ,
Nov 04, 2016 Nov 04, 2016

Copy link to clipboard

Copied

LATEST

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.

Votes

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
community guidelines