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

Number Counter Expression not working properly

New Here ,
Jul 24, 2024 Jul 24, 2024

Copy link to clipboard

Copied

Hi all! 

 

I have this expression entered for a simple number counter and it is working for any numbers from 0-199 but once it gets to 200 it changes to 20. From 200 to the number I want (332) it periodically changes the numbers to be two digits instead of three. 

 

Here is the expression I have: effect("Slider Control")("Slider").value.toFixed(0)

 

It will jump from this: 

Screenshot 2024-07-24 at 11.43.21 AM.png

To this:

Screenshot 2024-07-24 at 11.43.26 AM.png

Then back to this: 

Screenshot 2024-07-24 at 11.44.57 AM.png

Is there any way for it to count normally or is this a bug from the new AE update?

TOPICS
Expressions

Views

190

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

Community Expert , Jul 24, 2024 Jul 24, 2024

Your expression works fine. Is it possible that you're using a box text that isn't quite wide enough for the widest numbers?

Votes

Translate

Translate
Community Expert ,
Jul 24, 2024 Jul 24, 2024

Copy link to clipboard

Copied

It would help us help you if we saw your expression. 

 

If you are generating the numbers with an Expression Control Slider, this expression will work:

num = effect("Slider Control")("Slider").value;
num.toFixed()

You must be doing something more complicated than that.

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
Community Expert ,
Jul 24, 2024 Jul 24, 2024

Copy link to clipboard

Copied

Your expression works fine. Is it possible that you're using a box text that isn't quite wide enough for the widest numbers?

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
New Here ,
Jul 24, 2024 Jul 24, 2024

Copy link to clipboard

Copied

LATEST

Thanks so much, it was just that simple fix. As all of us designers know, sometimes it's the easiest fix. 

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