Creative Communities of the World Forums

The peer to peer support community for media production professionals.

  • Posted by Mike Moon on January 28, 2010 at 5:15 pm

    Hello cows,

    I know, I know, there are tons of posts relating to numbers counting up with various methods to approach it. But the problem I’m having is having it count slow to fast.

    This is the script I was using,

    startVal = 10934;
    endVal = 10982
    ;
    dur = 15.24
    ;

    val = linear(time,0,dur,startVal,endVal);
    s = “” + (0 + Math.floor(val));

    I want the end value to be higher of course maybe to like 50,000?

    Thanks guys

    Mike Moon replied 16 years, 4 months ago 2 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    January 28, 2010 at 5:37 pm

    You want it to accelerate as it counts, going from 10934 to around 50000 in 15.24 seconds, is that correct?

    Play around with this and see if it’s close to what you’re after:

    startVal = 10934;
    rate = .67;

    val = startVal + Math.exp(time*rate) – 1;
    s = “” + Math.floor(val);

    Adjust “rate” to change the result at a particular time.

    Dan

  • Mike Moon

    January 28, 2010 at 6:00 pm

    I think that works just great. Thanks for your help. Btw is there any books you would suggest to help me learn how to understand scripts in AE?

  • Dan Ebberts

    January 28, 2010 at 6:59 pm

    If by “scripts” you mean expressions, Marcus Geduld’s book is a really good place to start. If you really mean scripts, then there really isn’t anything I’m aware of that’s better than Adobe’s After Effects Scripting Guide.

    Oh, and in either case, a good JavaScript reference will be useful too.

    Dan

  • Mike Moon

    January 28, 2010 at 7:18 pm

    yeah i meant expressions sorry.

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