ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Looping a countdown with expressions only.

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Jesse Eslinger
Looping a countdown with expressions only.
on Nov 19, 2018 at 8:20:31 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)


Return to posts index

Alex Printz
Re: Looping a countdown with expressions only.
on Nov 19, 2018 at 9:17:19 pm

Try this:

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


Alex Printz
Mograph Designer


Return to posts index

Jesse Eslinger
Re: Looping a countdown with expressions only.
on Nov 19, 2018 at 9:25:57 pm

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

I appreciate it!

Jesse


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]