Activity › Forums › Adobe After Effects Expressions › Expression Count Up Percentage
-
Expression Count Up Percentage
Christoph Heimer replied 9 years, 4 months ago 11 Members · 24 Replies
-
Dan Ebberts
June 25, 2013 at 10:19 pmIf you want it to reverse the count direction, just change this:
beginCount = 123;
stopCount = 101;to this:
beginCount = 101;
stopCount = 123;Is that what you mean?
Dan
-
Chandra Hope
June 25, 2013 at 10:24 pmI tired that and it wouldn’t work, did I type something wrong?
beginCount = 55;
stopCount = 0;
beginTime = 55; // start counting at time = 0
countDur = 1; // count for 4 seconds
“” + Math.round(linear(time,beginTime,beginTime + countDur,beginCount,stopCount)) + “%” -
Dan Ebberts
June 25, 2013 at 11:43 pmYou have it set up to start counting at 55 seconds into the comp, and to count down from 55 to 0 over a 1-second duration. I’m guessing maybe you wanted it to start counting at an earlier time. Just set beginTime to whatever that is. If that’s not the issue, please explain what it is that you want it to do.
Dan
-
Spiro
November 5, 2013 at 3:54 pmI can’t figure out how to start with something like “$0000” on screen, and have it count up from there. All the expressions I’ve found start with “$0.” I want to initially start with four zeros.
-
Dan Ebberts
November 5, 2013 at 7:44 pmTry this:
beginCount = 0;
stopCount = 100;beginTime = 0; // start counting at time = 0
countDur = 4; // count for 4 secondscount = linear(time,beginTime,beginTime+countDur,beginCount,stopCount);
s = “” + Math.floor(count);
while (s.length < 4) s = “0”+s;
“$”+sDan
-
John Hernández
March 31, 2016 at 12:23 amHey Dan, I know this is an old post. Just wanted to ask… Where did you learn all that? I’ve been an independent producer since 3 years ago and AE is still one bigger weaknes. Greetins and thanks in advance.
-
Dan Ebberts
March 31, 2016 at 12:54 amI just jumped in when AE got expressions. I hadn’t really seen JavaScript before that, so I’m still learning as I go…
Dan
-
Liran Tabib
April 22, 2016 at 6:35 amHi Dan
Just wanted to say Thanks for spreading your knowledge on Expressions. I learned a lot from reading your Posts and Articles over the years, and today I love using expressions thanks to you.
I’ve created a Counter Preset that will save everyone the headache of creating counter Animations:
https://www.vdodna.com/products/counter-preset/I’ll Send you a gift copy through your site.
Thanks
Liran -
Joshua Bird
April 22, 2016 at 6:29 pmHi Dan,
Your expressions are really good and could use your expertise on figuring something similar to this one out.
I have two layers. Layer 1’s opacity goes from 0-100% (this percentage is controlled by the progress of another layers effect that I have already linked it to). I want layer 2’s opacity to go from 0-100% as well but only start when Layer 1 is at 87%. How would I do that and end at 100% when Layer 1 reaches 100%?
Thanks,
Josh
-
Dan Ebberts
April 22, 2016 at 6:45 pmThis should work:
v1 = thisComp.layer(“layer 1”).transform.opacity;
linear (v1,87,100,0,100)Dan
Reply to this Discussion! Login or Sign Up