3 Replies Latest reply on Feb 8, 2017 6:50 AM by resdesign

    Looping a number count

    tobiasw6213199

      Hello,

       

      I am creating a banner in Edge with a number count going from 0 to 1000, then slowly going to 1001... 1002... 1003... and then restarting.

      I have searched the forum and I am using a code that I found in a previous post that works for the number count (see below), but I cannot get it to loop. Usually when I want to loop a banner I go to a specific time in the timeline and insert a trigger with "this.play (0);". This still loops the banner but not the loop count. Any tips on how to go about this?

       

      Here is link to my banner:

      Banner


      Here is the code:

       

      var counter_delay = 0;

      var max_count = 1000;

      var present_count = 0;

       

       

      var timer = window.setInterval(stepUp,counter_delay);

      function stepUp(){

      present_count++;

      // Change the text of an element

      sym.$("Text").html(present_count);

      if(present_count==max_count)

      clearInterval(timer);

      }