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
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);
}
}
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);
}
}
Copy link to clipboard
Copied
Thank you for sharing your solution here. It will help other users with a similar issue.
Thanks,
Preran
Copy link to clipboard
Copied
He just said it "does not seem to be working".
Working solution to his problem was already posted over in another thread anyway.