Creative Communities of the World Forums

The peer to peer support community for media production professionals.

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 pm

    I 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 am

    A 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

    April 27, 2010 at 10:55 pm

    Thank you. This expression worked perfectly.

  • Lisa Ruiz

    September 14, 2010 at 4:36 pm

    I’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 pm

    Try 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 pm

    i 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 am

    useful 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 pm

    Try changing “linear” to “ease” or “easeIn” or “easeOut”.

    Dan

  • Iqbal Muhammad

    February 14, 2013 at 10:30 am

    thanks dan , and how if i want give symbol in front of number ?

  • Dan Ebberts

    February 14, 2013 at 6:35 pm

    Just add it in front like this:

    “$” + count

    Dan

  • Chandra Hope

    June 25, 2013 at 9:51 pm

    Hi 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!

Page 1 of 3

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy