Skip to main content
Known Participant
February 1, 2023
Answered

How to make a number countdown using keyframes?

  • February 1, 2023
  • 4 replies
  • 1056 views

Hi,

 

Someone suggested using expressions (http://www.motionscript.com/design-guide/counter.html) to create a simple countdown from one number to another. Problem is that I need to keyframe the countdown so that the number doesn't just go from beginning to the end in 2 points, but it needs to have multiple points so I could control the flow of the number through specific points in time. I just can't figure out how to do that.

 

If someone has a suggestion I'd much appreciate it!

 

Thanks,

This topic has been closed for replies.
Correct answer Mylenium

Replace the time variable in the code with an expression slider:

 

t = time - inPoint;

 

to

 

 

t=thisComp.layer("XYZ").effect("slider")(1);

 

 

Mylenium

4 replies

Mylenium
Legend
February 2, 2023

Of course you need to chan ge the references to what your layers and effect controls are actually named.

 

Mylenium

Known Participant
February 2, 2023

Got it going, appreciated!

Mylenium
MyleniumCorrect answer
Legend
February 2, 2023

Replace the time variable in the code with an expression slider:

 

t = time - inPoint;

 

to

 

 

t=thisComp.layer("XYZ").effect("slider")(1);

 

 

Mylenium

Known Participant
February 2, 2023

Sadly I never worked with JS and it looks like something additional is needed when entering the code you suggested.

 

I end up getting "error: layer named XYZ is missing" or "error: effect named slider is missing"

Renaming the text layer seems understandable, but not sure if your code requires me to insert a specific effect for it (Slider Control?)? Yeah man you are dealing with an absolute noob. JS is just not something I expected to need to handle. Know nothing of it. Combination of using JS and AE is just blowing my mind, and not currently in good ways x) thanks for your time.

Known Participant
February 2, 2023

Also, I've tried converting the countdown expression to keyframes but it just refuses to be controlled by em. It seems to be forced by the code to run down from A to B.

Known Participant
February 1, 2023

And just to add, I need to use numbers greater then 30000 so the "Numbers" effects wont work.