Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Robinhood app style number animations

  • Robinhood app style number animations

    Posted by Fletcher Groeneman on October 7, 2019 at 10:16 pm

    Hello Creative Cow community,

    I am working on a financial data dashboard that I will be animating with canned “live” data.
    Every second or so (using the psterizeTime() expression) the number will randomly move up or down an amount.

    What I would like to do is if the number moves up, first turn the digits green, then change the number. If the numbers move down, turn the digits red, then change the number.

    Basically I want rebuild the animation on Robinhood App (dropbox link):
    https://www.dropbox.com/s/1r00fvnk12jx8yd/Robinhood%20Animation.gif?dl=0

    Any ideas? Extra bonus points for ideas on how to do the number position animation in that GIF too.

    – Fletcher Groeneman

    Dan Ebberts replied 6 years, 10 months ago 2 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    October 7, 2019 at 11:19 pm

    This is just to give you a rough idea. Add a Point Control and a Fill effect to your text layer. Add this expression to the Point Control:

    period = 1; // duration of each random number
    seed = Math.floor(time/period);
    t = time%period;
    seedRandom(seed,true);
    nCur = random (1805,1807);
    seedRandom(seed-1,true);
    nPrev = random (1805,1807);
    [nPrev,nCur]

    Add this expression to the Source Text:

    period = 1;
    t = time%period;
    pc = effect(“Point Control”)(“Point”).value;
    nPrev = pc[0];
    nCur = pc[1];
    t < 1/3 ? nPrev.toFixed(2) : nCur.toFixed(2)

    Add this expression to the Fill color:


    period = 1;
    t = time%period;
    pc = effect("Point Control")("Point").value;
    nPrev = pc[0];
    nCur = pc[1];
    diff = nCur - nPrev;
    if (t < 2/3){
    diff < 0 ? [1,0,0,1] : [0,1,0,1];
    }else{
    [0,0,0,1]
    }

    Dan

  • Fletcher Groeneman

    October 7, 2019 at 11:39 pm

    Dan… wow.

    Totally blown away. This is genius. Works perfectly… Plus it’s so elegant!

    Thank you so so much!

    Any ideas for the number flipping motion? or is that just crazy-land?

    – Fletcher Groeneman

  • Dan Ebberts

    October 7, 2019 at 11:43 pm

    The problem is that it’s not just position, it’s a whole odometer-style animation. Certainly do-able, but a lot more work.

    Dan

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