Activity › Forums › Adobe After Effects Expressions › Expression Count Up Percentage
-
Expression Count Up Percentage
Posted by Lisa Ruiz on September 2, 2009 at 10:41 pmI would like to know if anyone knows of an expression that will let you count up a number with a percentage sign. For example I would like the initial number to read 0% and count up to 100%. I have tried to alter an expression I have that allows a dollar sign and I get an error. Any info would be appreciated.
Christoph Heimer replied 9 years, 4 months ago 11 Members · 24 Replies -
24 Replies
-
Dan Ebberts
September 3, 2009 at 12:09 amA text expression like this should work:
beginCount = 0;
stopCount = 100;beginTime = 0; // start counting at time = 0
countDur = 4; // count for 4 seconds“” + Math.round(linear(time,beginTime,beginTime + countDur,beginCount,stopCount)) + “%”
Dan
-
Lisa Ruiz
September 14, 2010 at 4:36 pmI’m going to use this expression again, but I need to add a decimal. Do you have an expression for that?
I need to go from 12.3% to 10.1%
-
Dan Ebberts
September 14, 2010 at 5:07 pmTry this:
beginCount = 123;
stopCount = 101;beginTime = 0; // start counting at time = 0
countDur = 4; // count for 4 seconds
count = linear(time,beginTime,beginTime+countDur,beginCount,stopCount)/10;
count.toFixed(1) + “%”Dan
-
Fasasi Olabanji
October 8, 2012 at 2:34 pmi was have same problem here too but as i Google for solution i saw this post under the search result and it just answer my question thanks for this post.
beginCount = 0;
stopCount = 100;beginTime = 0; // start counting at time = 0
countDur = 4; // count for 4 seconds"" + Math.round(linear(time,beginTime,beginTime + countDur,beginCount,stopCount)) + "%"
-
Conrad Dsouza
December 24, 2012 at 10:18 amuseful expression .. but how can I ease-in or ease-out the %tage countdown/countup?
beginCount = 0; stopCount = 100; beginTime = 0; // start counting at time = 0 countDur = 4; // count for 4 seconds "" + Math.round(linear(time,beginTime,beginTime + countDur,beginCount,stopCount)) + "%" -
Dan Ebberts
December 24, 2012 at 5:56 pmTry changing “linear” to “ease” or “easeIn” or “easeOut”.
Dan
-
Iqbal Muhammad
February 14, 2013 at 10:30 amthanks dan , and how if i want give symbol in front of number ?
-
Chandra Hope
June 25, 2013 at 9:51 pmHi there, how could I make this do the opposite and make it count backwards? I tried playing with some of the text but was way off 🙂
(I already got it to work by just making it a pre-comp and then reversing the time for the purposes of getting what I need done fast, but I was just curious what the code would look like 🙂 )
Thanks!
Reply to this Discussion! Login or Sign Up