ADOBE AFTER EFFECTS: Forum Expressions Tutorials Podcasts Creative Cloud

number counting expression

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
kelly armstrongnumber counting expression
by 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 CuevasRe: number counting expression
by 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 armstrongRe: number counting expression
by 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 >>
© 2016 All Rights Reserved