Skip to main content
Known Participant
December 29, 2018
Question

Start/Stop Audio using JavaScript

  • December 29, 2018
  • 1 reply
  • 361 views

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.

    This topic has been closed for replies.

    1 reply

    kglad
    Community Expert
    Community Expert
    December 29, 2018

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