Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity › Forums › Adobe After Effects › Counter Control with Expressions

  • Counter Control with Expressions

    Posted by Jules Pontarius on October 4, 2012 at 7:54 pm

    We’ve been trying to create a flip clock type counter in After Effects for a client video, and have gotten a single digit flip counter in working order, so that as you scrub down the timeline the numbers increment up.

    However, we want it to be a three digit counter, and are having trouble thinking of an expression that would make the ten’s place holder increment up by 1 only when the one’s place holder transitions from 9 to 0.

    Can anyone out there help?

    Tudor “ted” jelescu replied 13 years, 11 months ago 3 Members · 4 Replies
  • 4 Replies
  • Jules Pontarius

    October 4, 2012 at 8:05 pm

    Nevermind, on the ten’s place precomp we applied a time offset variable and basically divided it by ten.

  • John Cuevas

    October 4, 2012 at 8:10 pm

    Here’s an expression from After Effects Expressions that you might find useful:


    var startingMinute = 9;
    var startingSecond = 4;
    var seconds = Math.floor(time) + startingSecond;
    var minutes = Math.floor(seconds / 60) + startingMinute;
    var secondsAsPartsOfAMinute = Math.floor(seconds % 60);
    function addZeros(rawNumber)
    {
    if (rawNumber < 10) return "0" + rawNumber;
    return "" + rawNumber;
    }
    addZeros(minutes) + ":" + addZeros(secondsAsPartsOfAMinute);

    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.

  • John Cuevas

    October 4, 2012 at 8:10 pm

    That’s another good solution.

    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.

  • Tudor “ted” jelescu

    October 6, 2012 at 3:59 pm

    You could also pre-compose the first animation and then Time Remap the pre-comp accordingly.

    Tudor “Ted” Jelescu
    Senior VFX Artist

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