Skip to main content
Known Participant
October 20, 2022
Answered

Counter with Slider Control - Add space

  • October 20, 2022
  • 2 replies
  • 1596 views

Hi!

I can't find the solution to something I thought can be easily fixed.

I created a very basic counter, going from 100 € to 2000 €.

So the Slider Control effect is applied on a solid, and I applied this expression to the Source Text:

 

Math.round(thisComp.layer("counter").effect("Slider Control")("Slider")) + " €"

 

However, I would like the numbers above 999 to be spelt with a space. So basically: "1 000", instead of "1000".

I found the expression "addComas", but nothing for the space.

 

Can you help me on that?

 

Thanks!

Correct answer Adam24585301qycn

I believe you can replace the comma with a space in line 26 ( I think )

2 replies

Mylenium
Brainiac
October 20, 2022

It doesn't matter what you add as the delimiter. A space is just the same as a comma and it's added with an " " or a"\s".

 

Mylenium 

Mylenium
Brainiac
October 20, 2022

http://www.motionscript.com/design-guide/counter.html

 

Really nothing else required.

 

Mylenium 

Known Participant
October 20, 2022

Thank you but unless I didn't understand it well, this is for adding comas, right?

What I need is adding blank spaces. "1 000", "1 500"... no coma, no dot.

 

Is there any chance I can make this happen with a bunch of code lines?

 

Thanks!

Adam24585301qycn
Inspiring
October 20, 2022

I believe you can replace the comma with a space in line 26 ( I think )


'' ''