3 Replies Latest reply on Mar 17, 2017 12:51 PM by ClayUUID

    html 5 canvas count up

    ludo_b*

      Hi Guys,

       

      I am using animate cc and creating a banner using the html 5 canvas.

       

      I wanted to create a dynamic text and just do a simple count up.

      from "0" to "2,900".

       

      I have not used flash in over two years and any help would be amazing.

       

      Regards,

       

      Ludovic

        • 1. Re: html 5 canvas count up
          ludo_b* Level 1

          Got it Guys sorry.

           

          I am trying to make it go to frame 2 once it has reached 2900.

          I added what i think would work in red below. but it does not seem to be working.

           

          stop();

          var tl = this

          tl.start_num=0;

          tl.end_num=2900;

          tl.current_num=tl.start_num;

          tl.tickI = setInterval(myFunction,10);

          tl.tf.text = tl.current_num.toString();

           

           

          function myFunction(e){

          tl.current_num++;

          tl.tf.text=tl.current_num;

          if(tl.current_num==tl.end_num){

          clearInterval(tl.tickI);

          this.gotoAndPlay(2);

          }

          }

          • 2. Re: html 5 canvas count up
            Preran Adobe Employee

            Thank you for sharing your solution here. It will help other users with a similar issue.

             

            Thanks,

            Preran

            • 3. Re: html 5 canvas count up
              ClayUUID Adobe Community Professional

              He just said it "does not seem to be working".

               

              Working solution to his problem was already posted over in another thread anyway.