Activity › Forums › Adobe After Effects Expressions › Money counter w/ a non-liner counting progression
-
Money counter w/ a non-liner counting progression
Ernesto Sanchez replied 11 years, 8 months ago 4 Members · 17 Replies
-
Dustin Ward
May 25, 2011 at 3:44 pmOh, I see. When I spin the angle it doesn’t do anything, but when I play it back with keyframes it does. So, where is it receiving the number from? Say I wanted the cents to land on 21.. how would I do that?
-
Ernesto Sanchez
November 19, 2014 at 12:39 amHi Dan,
I need to add a dollar sign to to the following digits $1,292,788. I’m using this expression below
startValue = 0;
endValue = 1292788;
dur = 8.5; //secondss = "" + 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)
else
s -
Dan Ebberts
November 19, 2014 at 1:09 amThis is one way:
startValue = 0;
endValue = 1292788;
dur = 8.5; //seconds
s = "" + Math.round(linear(time,0,dur,startValue,endValue));
if (s.length > 6)
s = s.substr(0,s.length-6) + "," + s.substr(-6,3) + "," + s.substr(-3,3)
else if (s.length > 3)
s = s.substr(0,s.length-3) + "," + s.substr(-3,3);
"$" + s
Dan
Reply to this Discussion! Login or Sign Up