Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects number counting expression

  • number counting expression

    Posted by Kelly Armstrong on April 15, 2014 at 10:29 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!

    Thanks,

    Kelly

    Kelly Armstrong replied 12 years, 1 month ago 2 Members · 2 Replies
  • 2 Replies
  • John Cuevas

    April 15, 2014 at 2:18 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)
    else
    s

    Johnny Cuevas, Editor
    Thinkck.com

    “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.

  • Kelly Armstrong

    April 15, 2014 at 4:18 pm

    Amazing! Thank you so much, that works perfectly.

    Cheers,

    Kelly

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