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

Counter with Slider Control - Add space

Explorer ,
Oct 20, 2022 Oct 20, 2022

Copy link to clipboard

Copied

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

Views

205

Translate

Translate

Report

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 )

Votes

Translate

Translate
LEGEND ,
Oct 20, 2022 Oct 20, 2022

Copy link to clipboard

Copied

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

 

Really nothing else required.

 

Mylenium 

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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!

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

'' ''

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

Awesome thank a lot!

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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 

Votes

Translate

Translate

Report

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