Highlighted

Start/Stop Audio using JavaScript

Community Beginner ,
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

96

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

Start/Stop Audio using JavaScript

Community Beginner ,
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

97

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
Dec 29, 2018 0
kglad LATEST
Adobe Community Professional ,
Dec 29, 2018

Copy link to clipboard

Copied

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

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...
Dec 29, 2018 0