Creating a counter in HTML5
Hi all,
We're trying to create a simple counter in HTML5, but all I find online is AS3...
We need the numbers to go from 10.000 -> 50.000
Is it possible?
Thanks for your help!
Hi all,
We're trying to create a simple counter in HTML5, but all I find online is AS3...
We need the numbers to go from 10.000 -> 50.000
Is it possible?
Thanks for your help!
Haha exactly ![]()
Thank you for your help!
var start = 10000;
var end = 50000;
var current = start;
var f = tickerF.bind(this)
createjs.Ticker.addEventListener('tick',f);
function tickerF(){
this.your_tf.text = current;
current++;
if(current>end){
createjs.Ticker.removeEventListener('tick',f);
}
}
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.