Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Looping a countdown with expressions only.

  • Looping a countdown with expressions only.

    Posted by Jesse Eslinger on November 19, 2018 at 8:20 pm

    Hi,

    I am a novice with expressions and can’t come up with a solution for this countdown problem. I want to have a countdown that goes 9 to 0 and then resets at 9 and repeats countdown instead of going to -1. The expression below is doing exactly what I want, except I want it to loop after zero is completed. I am aware of the option to precomp and time-remap but I want to achieve this all with expressions. I have tried setting up variables and doing if/else for if that value goes less than zero but just can’t come up with it.

    Thanks in advance for your help!

    Jesse

    Math.round(9-time)

    Jesse Eslinger replied 7 years, 5 months ago 2 Members · 2 Replies
  • 2 Replies
  • Alex Printz

    November 19, 2018 at 9:17 pm

    Try this:

    t = 9;
    t-= time%t;
    t.toFixed(0)

    Alex Printz
    Mograph Designer

  • Jesse Eslinger

    November 19, 2018 at 9:25 pm

    Thanks Alex, that is perfect! Now I am going to have some fun figuring out how it works.

    I appreciate it!

    Jesse

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