Oh my god! I was messing around for the last hour trying to figure out why it wasn't working. JavaScript enabled, and I feel like dancing on clouds! Thank you!
Thank you so much for sharing this tutorial. Very clearly explained, to the point and extremely helpful! I just found your channel and I subscribed to it. U R Z Best!!!🤩🤩🤩
Hey this is great! For some reason I am not getting the decimal places though. Changing from parseInt to parseFloat made no change. Anyone solve this one?
If you are getting unwanted decimals behind your numbers while animated, you can use this expressions to round off the number: var num = Math.round(parseFloat(effect("Angle Control")("Angle"))); num.toLocaleString("en-GB"); Hope this helps somebody!
Hey there! with the currency version, is there a way to take out the decimal point after the numbers? For example I have animated up to #312,000,000.00" I just want it to say "$312,000,000" It did this with the non currency versions, so I know it's just my coding (and lack knowledge there of)
You certainly can, all you have to do is add "minimumFractionDigits: 0" to the options like so: var num = parseInt(effect("Angle Control")("Angle")); num.toLocaleString("en-GB", { style: "currency", currency: "GBP", minimumFractionDigits: 0, currencyDisplay: "narrowSymbol"});
Try adding: "minimumFractionDigits: 0" to the options like so: var num = parseInt(effect("Angle Control")("Angle")); num.toLocaleString("en-GB", { style: "currency", currency: "GBP", minimumFractionDigits: 0, currencyDisplay: "narrowSymbol"});
Thank you so much for this great tutorial! How would I modify the expression for percentages instead of currencies? (where the % symbol would come after the number) And is it possible to add a space between the currency symbol and the number as in "$ 1,000.00" instead of "$1,000.00"?
Try this for percentages: var num = parseFloat(effect("Angle Control")("Angle")/100); num.toLocaleString('en-us', {style: 'percent'}); I'm not sure on the space between the currency symbol though.
@@MadeByLoop Thanks very much Made By Loop, much appreciated. I just came across another video regarding the new scripting syntax that actually allows you to add a space if desired. I found it here: th-cam.com/video/j3HftxMxbfs/w-d-xo.html. But it does seem a lot more complex (a lot more characters involved in the script). I copied his script below and added double quotation marks at both ends to remind myself where to put the currency and percentage symbols. Here a space can be added if needed. Just thought I’d share it with you in case anyone else asks. Thanks again! 😃 USING POINT CONTROL: s = "" + (effect("Point Control")("Point")[0]).toFixed(2)+""; s.replace(/\B(?=(\d{3})+(?!\d))/g, ","); USING ANGLE CONTROL (IF YOU NEED EXPONENTIAL SCALE) s = "" + (effect("Angle Control")("Angle")[0]).toFixed(2)+""; s.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
@@siobhanodonoghue3240 Yep! Just change the expression to this: var num = parseFloat(effect("Angle Control")("Angle"))/100; num.toLocaleString("en-GB", { style: "percent", minimumFractionDigits: 1}); Then change the angle control value to 45.7 and you should be good to go.
Tom, how would I get this expression to display a distance measured with commas and decimals like: "3,250.75 miles". If I modify the expression this way: var num = parseFloat(effect("Angle Control")("Angle")).toFixed(2)+" miles"; num.toLocaleString("en-GB"); I get "3250.75 miles" but it's missing the commas which I would like to display.
@@nickjames5602 Hey Nick, first off make sure you have "Javascript" enabled in the Expressions tab of the Project settings. Then try this: var num = parseFloat(effect("Angle Control")("Angle")); num.toLocaleString('en-GB', {maximumFractionDigits:2}) + " miles"; When you keyframe the angle control from something like 5600.55 to 1000.00 That should work.
@@VideosByThomas Thanks so much Tom! You're the best! 😀 It works perfectly now. Just one final question. I notice that depending on the font chosen for these animated counters, some will bounce around side to side and others won't when counting up or down. Is it because they're not monospaced that they bounce when animating?
Add "minimumFractionDigits: 0" to the options like so: var num = parseInt(effect("Angle Control")("Angle")); num.toLocaleString("en-GB", { style: "currency", currency: "GBP", minimumFractionDigits: 0, currencyDisplay: "narrowSymbol"}); Only swap out the gbp for your chosen currency!
Finally someone who delivered a simple result without trying to sell something. You got my like and my subscription.
Huge help! Thanks so much. If it doesn't work try going to File > Project Settings > Expressions and see if JavaScript is enabled.
Chris, big thanks for this - it was driving me nuts why it wasn't working.
Oh my god! I was messing around for the last hour trying to figure out why it wasn't working. JavaScript enabled, and I feel like dancing on clouds! Thank you!
massive help! thank you!!
THANK YOU.
Genuine lifesaver mate, thanks! 🍺
This is a high-quality tutorial. Thank you!
Cheers for this. Making number counters is the bane of my life, this simplifies it so much.
Thank you so much for sharing this tutorial. Very clearly explained, to the point and extremely helpful! I just found your channel and I subscribed to it. U R Z Best!!!🤩🤩🤩
Thank you so much for this tutorial! Quick and to the point.
you're a life saver
EXACTLY WHAT I NEEDED! Thank you so much!
Ahhh yes this worked! Thank you so much!
AMAZING tutorial. Subscribed! THANK YOU THANK YOU THANK YOU!!!!
man, this is AMAZINGG, thank u so much bro, respect
Does this not work in AE 2022? I created the expression step by step... but the commas aren't appearing. Hmm
Yeah, it's not working.
This is so clear and so helpful. Thank you!!
Top work!
Wonderful! How might i add the % symbol to the end?
Hey this is great! For some reason I am not getting the decimal places though. Changing from parseInt to parseFloat made no change. Anyone solve this one?
It was so great. thank you!
If you are getting unwanted decimals behind your numbers while animated, you can use this expressions to round off the number:
var num = Math.round(parseFloat(effect("Angle Control")("Angle")));
num.toLocaleString("en-GB");
Hope this helps somebody!
amazing thank you!
THANK YOU!
Hey there! with the currency version, is there a way to take out the decimal point after the numbers? For example I have animated up to #312,000,000.00" I just want it to say "$312,000,000" It did this with the non currency versions, so I know it's just my coding (and lack knowledge there of)
You certainly can, all you have to do is add "minimumFractionDigits: 0" to the options like so:
var num = parseInt(effect("Angle Control")("Angle"));
num.toLocaleString("en-GB", { style: "currency", currency: "GBP", minimumFractionDigits: 0, currencyDisplay: "narrowSymbol"});
How can I maintin center text as its moving up in decimal places?
ok, this is gonna sound stupid but how do I animate the cents? I keep getting it at zero but I need the cents to have a different value
For some reason this isn't working for me. After putting the expression the commas still don't show. Not sure what I'm doing wrong here
Hello! What version of After Effects are you using? Do you get any expression errors when you use it?
@@MadeByLoop same problem for me. I have 2021 and no error message came up but it doesn’t show commas.
@@CNurse Try going to File > Project Settings > Expressions and see if JavaScript is enabled
@@MadeByLoop Same problem, but after enabled Java, it works... thank you!!!!
@@MadeByLoop I have Java enabled but still no decimals
Do you know how to remove the cents. For example $20,000,000 in stead of $20,000,000.00? I tried with the Locale help page but had no luck.
Try adding: "minimumFractionDigits: 0" to the options like so:
var num = parseInt(effect("Angle Control")("Angle"));
num.toLocaleString("en-GB", { style: "currency", currency: "GBP", minimumFractionDigits: 0, currencyDisplay: "narrowSymbol"});
@@MadeByLoop Perfect! That worked! Thank you!
Thank you so much for this great tutorial! How would I modify the expression for percentages instead of currencies? (where the % symbol would come after the number) And is it possible to add a space between the currency symbol and the number as in "$ 1,000.00" instead of "$1,000.00"?
Try this for percentages:
var num = parseFloat(effect("Angle Control")("Angle")/100);
num.toLocaleString('en-us', {style: 'percent'});
I'm not sure on the space between the currency symbol though.
@@MadeByLoop Thanks very much Made By Loop, much appreciated. I just came across another video regarding the new scripting syntax that actually allows you to add a space if desired. I found it here: th-cam.com/video/j3HftxMxbfs/w-d-xo.html. But it does seem a lot more complex (a lot more characters involved in the script). I copied his script below and added double quotation marks at both ends to remind myself where to put the currency and percentage symbols. Here a space can be added if needed. Just thought I’d share it with you in case anyone else asks. Thanks again! 😃
USING POINT CONTROL:
s = "" + (effect("Point Control")("Point")[0]).toFixed(2)+"";
s.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
USING ANGLE CONTROL (IF YOU NEED EXPONENTIAL SCALE)
s = "" + (effect("Angle Control")("Angle")[0]).toFixed(2)+"";
s.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
@@MadeByLoop This is great, thanks so much!
Is there a way to do a percentage with decimals for example 45.7% ?
@@siobhanodonoghue3240 Yep! Just change the expression to this:
var num = parseFloat(effect("Angle Control")("Angle"))/100;
num.toLocaleString("en-GB", { style: "percent", minimumFractionDigits: 1});
Then change the angle control value to 45.7 and you should be good to go.
how to make the zeros before with the commas
Tom, how would I get this expression to display a distance measured with commas and decimals like: "3,250.75 miles". If I modify the expression this way:
var num = parseFloat(effect("Angle Control")("Angle")).toFixed(2)+" miles";
num.toLocaleString("en-GB");
I get "3250.75 miles" but it's missing the commas which I would like to display.
Hey Nick, try this:
var num = parseFloat(effect("Angle Control")("Angle"));
num.toLocaleString('en-US', {maximumFractionDigits:2});
num +" miles";
@@MadeByLoop Hi Tom, thanks very much for your help. But when I paste it in, I don't see commas and I get instead many digits after the decimal.
@@nickjames5602 Hey Nick, first off make sure you have "Javascript" enabled in the Expressions tab of the Project settings.
Then try this:
var num = parseFloat(effect("Angle Control")("Angle"));
num.toLocaleString('en-GB', {maximumFractionDigits:2}) + " miles";
When you keyframe the angle control from something like 5600.55 to 1000.00
That should work.
@@VideosByThomas Thanks so much Tom! You're the best! 😀 It works perfectly now. Just one final question. I notice that depending on the font chosen for these animated counters, some will bounce around side to side and others won't when counting up or down. Is it because they're not monospaced that they bounce when animating?
@@nickjames5602 Hey Nick, glad I could help! I think you're right that it's because the fonts aren't monospaced
what if I need number like (1,00,00,000) help me
how to change comma with dot?
Try changing the language code to one that uses dots instead of commas, 'de-DE' should do it!
I don't want the cents... How do I eliminate that? (I want $1,500 instead of $1,500.00)
Add "minimumFractionDigits: 0" to the options like so:
var num = parseInt(effect("Angle Control")("Angle"));
num.toLocaleString("en-GB", { style: "currency", currency: "GBP", minimumFractionDigits: 0, currencyDisplay: "narrowSymbol"});
Only swap out the gbp for your chosen currency!