Hi Thad, your getting there.... you need to make sure you don't have any sound in your timeline layers. You only need 1 event listener per button ....you only need to register one sound, as you pause, play that particular sound, unless you have a specific SoundOff sound.... this.stop(); // Register all our sounds here, as well as the fileload event. createjs.Sound.registerSound("sounds/PeterGunderMovement1.mp3", "SoundOn"); createjs.Sound.addEventListener("fileload", handleFileLoad); // Create all our variables here to be called later. var SoundOn = createjs.Sound.createInstance("SoundOn"); // Set the button visibility states. this.SoundOn.visible = true; this.SoundOff.visible = false; // Add the even listeners for our buttons. this.SoundOn.addEventListener("click", silence.bind(this)); this.SoundOff.addEventListener("click", serenade.bind(this)); function handleFileLoad(event) { // Once sound has loaded, start playing audio, you can also use this.play(); if you have animations. console.log("sound loaded"); createjs.Sound.removeEventListener("fileload", handleFileLoad); SoundOn.play(); SoundOff.paused = false; } function silence() { // the button called SoundOff will trigger this console.log("Button Pause Sound"); this.SoundOn.visible = false; this.SoundOff.visible = true; SoundOn.paused = true; } function serenade() { // the button called SoundOnwill trigger this console.log("Button Play Sound"); this.SoundOn.visible = true; this.SoundOff.visible = false; SoundOn.play(); SoundOff.paused = false; }
... View more