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

Counter with Slider Control - Add space

Explorer ,
Oct 20, 2022 Oct 20, 2022

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!

TOPICS
Expressions
966
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

Participant , Oct 20, 2022 Oct 20, 2022

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

Translate
LEGEND ,
Oct 20, 2022 Oct 20, 2022

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

 

Really nothing else required.

 

Mylenium 

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
Explorer ,
Oct 20, 2022 Oct 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!

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
Participant ,
Oct 20, 2022 Oct 20, 2022

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

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
Participant ,
Oct 20, 2022 Oct 20, 2022

'' ''

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
Explorer ,
Oct 20, 2022 Oct 20, 2022

Awesome thank a lot!

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
LEGEND ,
Oct 20, 2022 Oct 20, 2022
LATEST

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 

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