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

Start/Stop Audio using JavaScript

Community Beginner ,
Dec 29, 2018 Dec 29, 2018

Copy link to clipboard

Copied

Hi.

I need some help getting an auto icon button on my project to both play and stop/pause a sound. I'm currently using the following, but don't know how to tell it to resume the sound.

this.music.addEventListener("click", fl_MouseClickHandler_6.bind(this));

function fl_MouseClickHandler_6()

{

    createjs.Sound.stop(); 

}

Thank you.

Views

250

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
Community Expert ,
Dec 29, 2018 Dec 29, 2018

Copy link to clipboard

Copied

LATEST

use the paused boolean property of your sound instance to pause and unpause (true and false, resp.) your instance.

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