24 Replies Latest reply on Jun 15, 2018 8:35 AM by resdesign

    How to  play and pause timeline sound in animate cc canvas

    sumanr49634048 Level 1

      Hi Every One,

       

      I am import sound timeline, How to play and pause ?

       

      below code working fine, but how to control import sound?

      myInstance = createjs.Sound.play("snd_1");

      var sndVar = false;

      function pauseFun(){

          if(!sndVar){

              myInstance.paused = true;

              sndVar = true;

          }else{

              myInstance.paused = false;

              sndVar = false;

          }

      }

      this.imageMc.addEventListener("click",pauseFun.bind(this));