FORUMS: list search recent posts

number counting expression

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
kelly armstrong
number counting expression
on Apr 15, 2014 at 10:29:45 am

Hi there,

I'm trying to animate a number sequence, for increasing youtube views. I'd like to start at 10,000 and finish at 20,000,000.

I'm trying to use the slider, but it won't allow me to add commas into the number. I assume I need to make an expression, however I've never done this before so any help would be greatly appreciated!



Return to posts index

John Cuevas
Re: number counting expression
on Apr 15, 2014 at 2:18:46 pm

You can use this expression, courtesy of Dan Ebberts:

startValue = 0;
endValue = 120000000;
dur = 23; //seconds

s = "" + Math.round(linear(time,0,dur,startValue,endValue));
if (s.length > 6)
s.substr(0,s.length-6) + "," + s.substr(-6,3) + "," + s.substr(-3,3)
else if (s.length > 3)
s.substr(0,s.length-3) + "," + s.substr(-3,3)

Johnny Cuevas, Editor

"I have not failed 700 times. I have succeeded in proving that those 700 ways will not work. When I have eliminated the ways that will not work, I will find the way that will work."
---THOMAS EDISON on inventing the light bulb.

Return to posts index

kelly armstrong
Re: number counting expression
on Apr 15, 2014 at 4:18:47 pm

Amazing! Thank you so much, that works perfectly.



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved