1

I catch button in the code: this.buttons.Sound.addListener("pressed", this.__sound, this);

And write function, but then I push button sound off/on they didn't work.

__sound: function(){
  if (this.buttons.Sound.isEnabled()){
     createjs.Sound.volume = 1;
   } else {
     createjs.Sound.volume = 0;
   }
},
GabrielOshiro
  • 7,986
  • 4
  • 45
  • 57
Nazar
  • 11
  • 3

1 Answers1

0

After this all work

__sound: function(){

if (this.buttons.Sound.isEnabled()){
createjs.Sound.setVolume(1);
} else {
createjs.Sound.setVolume(0);
}
},
Nazar
  • 11
  • 3