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,
1 Correct answer
Replace the time variable in the code with an expression slider:
t = time - inPoint;
to
t=thisComp.layer("XYZ").effect("slider")(1);
Mylenium
Copy link to clipboard
Copied
And just to add, I need to use numbers greater then 30000 so the "Numbers" effects wont work.
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.
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
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.
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
Copy link to clipboard
Copied
Got it going, appreciated!

