Quantcast
Channel: Adobe Community : All Content - Edge Animate
Viewing all articles
Browse latest Browse all 9897

Looping a number count

$
0
0

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);

}


Viewing all articles
Browse latest Browse all 9897

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>