Skip to main content
Participant
March 9, 2022
Question

Adding commas to numbers in expression counter

  • March 9, 2022
  • 2 replies
  • 140 views

Hi

I know this question has been answered a few times already but I'm struggling to figure out what part of the expressiojn I need to add and where it needs to be added in order for me to get comma's. I've attached an image of what I have of the expression so far, can anyone help me?

This topic has been closed for replies.

2 replies

Community Expert
March 9, 2022
Mylenium
Legend
March 9, 2022

Something like this perhaps:

 

mVal=thisComp.layer("XYZ").effect("Slider")("Slider");

mString=Math.round(mVal).toString();

mPre=mString.substring(1,2);

mPost=mString.substring(mString.length,-3);

 

mPre()+","+mPost

 

Mylenium