0
Adding text to number counter
Community Beginner
,
/t5/after-effects-discussions/adding-text-to-number-counter/td-p/13721620
Apr 12, 2023
Apr 12, 2023
Copy link to clipboard
Copied
Hi
I'm using the below expression for a number counter
var num = parseFloat(effect("Angle Control")("Angle"));
num.toLocaleString('en-GB', {maximumFractionDigits:0}) + "%";
I'd like to add the text (%) before the number rather than after if possible?
Thanks
TOPICS
Expressions
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Community Expert
,
/t5/after-effects-discussions/adding-text-to-number-counter/m-p/13721656#M227564
Apr 12, 2023
Apr 12, 2023
Copy link to clipboard
Copied
This should work:
var num = effect("Angle Control")("Angle").value;
"%" + num.toLocaleString('en-GB', {maximumFractionDigits:0})
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
shmiths
AUTHOR
Community Beginner
,
LATEST
/t5/after-effects-discussions/adding-text-to-number-counter/m-p/13721677#M227565
Apr 12, 2023
Apr 12, 2023
Copy link to clipboard
Copied
Perfect, thanks!
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

