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

Putting a comma in an after effects counter

Community Beginner ,
Mar 03, 2019 Mar 03, 2019

Hi all,

I'm trying to make a simple counter in After Effects (which I did), but I can't seem to figure out how to put a comma after the number reaches past 100,000. I already tried what is out there within the YouTube community and other forums. I just can't seem to get it to work. Any suggestions?

22.0K
Translate
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

Engaged , Mar 03, 2019 Mar 03, 2019

Just copied this from a project I'm working on. If not working with dollars just remove the $ from text before.

countTotal=57000;

textBefore = "$";

textAfter = "";

n="" + Math.round(effect("Slider Control")("Slider")*countTotal/100); s="";

for(i=0, l=n.length;

i<l; i++){ if(s && s!="-" && (l-i)%3 ==0) s+=",";

s += n; } textBefore+s+textAfter;

Translate
Engaged ,
Mar 03, 2019 Mar 03, 2019

Just copied this from a project I'm working on. If not working with dollars just remove the $ from text before.

countTotal=57000;

textBefore = "$";

textAfter = "";

n="" + Math.round(effect("Slider Control")("Slider")*countTotal/100); s="";

for(i=0, l=n.length;

i<l; i++){ if(s && s!="-" && (l-i)%3 ==0) s+=",";

s += n; } textBefore+s+textAfter;

Translate
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
Community Beginner ,
Mar 03, 2019 Mar 03, 2019

Thank you! I will try this!

Translate
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
Community Expert ,
Mar 03, 2019 Mar 03, 2019

You should search for Dan Ebberts universal timer and save it as an animation preset. Dan Ebberts's Universal Counter.

Translate
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
New Here ,
Sep 17, 2019 Sep 17, 2019
Thanks for a great help!
Translate
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
Community Beginner ,
Mar 03, 2019 Mar 03, 2019

This worked perfectly, thank you so much!

Translate
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
Community Beginner ,
Dec 18, 2020 Dec 18, 2020
LATEST

Made by Loop's Numero After Effects script  now creates sliding number counters with commas and decimals if that's the effect you're looking for?

Translate
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