• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to make a number countdown using keyframes?

Explorer ,
Feb 01, 2023 Feb 01, 2023

Copy link to clipboard

Copied

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,

TOPICS
How to

Views

284

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Feb 01, 2023 Feb 01, 2023

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

 

t = time - inPoint;

 

to

 

 

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

 

 

Mylenium

Votes

Translate

Translate
Explorer ,
Feb 01, 2023 Feb 01, 2023

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 01, 2023 Feb 01, 2023

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 01, 2023 Feb 01, 2023

Copy link to clipboard

Copied

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

 

t = time - inPoint;

 

to

 

 

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

 

 

Mylenium

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 02, 2023 Feb 02, 2023

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 02, 2023 Feb 02, 2023

Copy link to clipboard

Copied

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

 

Mylenium

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 02, 2023 Feb 02, 2023

Copy link to clipboard

Copied

LATEST

Got it going, appreciated!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines