2 Replies Latest reply on Sep 5, 2014 8:26 AM by JotaSolano

    Timeline NOT playing onClick with setTimeout method


      Hello again,


      Following my streak of silly questions, I have yet another one. I tried asking on StackOverflow but the answer was unsuccessful. Basically I have a time function on the .compositionReady that triggers the timeline at specific time during the day. This timeline displays an animation and a dialogue with two buttons. One button (snooze_btn_sy) is supposed to "snooze" this dialogue and call the timeline again 10 minutes later (I have 4000 ms in the code just to test it). This is the code:




      function snooze() {
        sym.snooze() = setTimeout(snooze(), 4000);
      function updateClock() {
          var d = new Date(); // current date
                  var m = d.getMinutes();
          var h = d.getHours();
          // call this function again in 1000ms
          sym.updateClock = setTimeout(updateClock,1000);
          if(h== 9 && m== 45) { //at 9hrs 00 min 
      //run the dialogue for the morning pause
        else {
      updateClock(); // initial call







      I got the other button to play another animation with just sym.play(); but the snooze button just won't do anything. I created a public function as you can see, and I call it in the snooze_btn_sy.click code.



      Any ideas?


      Thank you!