• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

html 5 canvas count up

Community Beginner ,
Mar 16, 2017 Mar 16, 2017

Copy link to clipboard

Copied

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

Views

711

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Beginner , Mar 16, 2017 Mar 16, 2017

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

}

}

Votes

Translate

Translate
Community Beginner ,
Mar 16, 2017 Mar 16, 2017

Copy link to clipboard

Copied

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

}

}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Mar 17, 2017 Mar 17, 2017

Copy link to clipboard

Copied

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

Thanks,

Preran

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 17, 2017 Mar 17, 2017

Copy link to clipboard

Copied

LATEST

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

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines