Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Money counter w/ a non-liner counting progression

  • Dustin Ward

    May 25, 2011 at 12:08 am

    Yeah I have it set to 2, and it works, but they stay zeros.

  • Dan Ebberts

    May 25, 2011 at 12:12 am

    Do your keyframes have decimals in the values?

    Dan

  • Dustin Ward

    May 25, 2011 at 3:44 pm

    Oh, 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?

  • Dan Ebberts

    May 25, 2011 at 5:13 pm

    You’d have a keyframe with angle that ends in .21

    Dan

  • Ernesto Sanchez

    November 19, 2014 at 12:39 am

    Hi 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; //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

  • Dan Ebberts

    November 19, 2014 at 1:09 am

    This 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

  • Ernesto Sanchez

    November 19, 2014 at 6:35 pm

    You da man Dan! much appreciated!

Page 2 of 2

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