Skip to main content
Participating Frequently
March 29, 2017
Answered

Creating a counter in HTML5

  • March 29, 2017
  • 1 reply
  • 3564 views

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!

    This topic has been closed for replies.
    Correct answer kglad

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

    }

    }

    1 reply

    kglad
    Community Expert
    Community Expert
    March 29, 2017

    you want something that you click (up or down) to increment or decrement a display?

    Participating Frequently
    March 29, 2017

    No, just the running numbers automatically

    kglad
    Community Expert
    Community Expert
    March 29, 2017

    what are "..running numbers.."?

    do you want something that displays numbers incrementing from 10,000 to 50,000 over some time period?