Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions simple counter expression needed

  • simple counter expression needed

    Posted by Felicia Van os on November 5, 2010 at 9:23 pm

    Hi, this is my first attempt with expressions. I simply want a number to change from 1 to 21, in sequence, over about 5 seconds. I could make one layer per number and just cut from one to the next, but I am sure there is a better way to do this, and a way that allows me to control the speed with a value or one keyframe. I searched the forum but only found much more complex counters. Can anyone help? Thanks so much.

    Felicia Van os replied 15 years, 9 months ago 2 Members · 2 Replies
  • 2 Replies
  • Kevin Camp

    November 5, 2010 at 9:52 pm

    there are a few ways to do this.

    one doesn’t use expressions at all, it just uses the good ol’ numbers effect. add it to a solid, pick a font, then you’ll just keyframe the change and set the color…

    another fairly simple way is to create a text layer (you can type something like ‘counter’ but it doesn’t matter). then add a slider expression control (effects>expression controls). add an expression to the source text of the text layer like this:

    Math.round(effect('Slider Control')('Slider'));
    then key frame the slider control.

    or 100% expression, like this:

    Dur=5; // duration of countdown in seconds
    Start=1; // start value for counter
    End=21; // end value for counter

    Math.round(linear(time,inPoint,inPoint+Dur,Start,End));
    just adjust the layer’s inpoint to be where you need it to start counting.

    Kevin Camp
    Senior Designer
    KCPQ, KMYQ & KRCW

  • Felicia Van os

    November 5, 2010 at 9:55 pm

    Thanks so much for the quick response! I’m gonna play around with these options.

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