Skip to main content
Participant
July 24, 2024
Answered

Number Counter Expression not working properly

  • July 24, 2024
  • 2 replies
  • 807 views

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: 

To this:

Then back to this: 

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

This topic has been closed for replies.
Correct answer Dan Ebberts

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

2 replies

Dan Ebberts
Community Expert
Dan EbbertsCommunity ExpertCorrect answer
Community Expert
July 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?

Participant
July 24, 2024

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

Community Expert
July 24, 2024

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.