Skip to main content
Participant
Jul 24, 2024 4:46 PM UTC
Answered

Number Counter Expression not working properly

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 is closed to new replies. Start a new post to keep the conversation going.
Dan Ebberts
Dan EbbertsCorrect answer
Community Expert
Jul 24, 2024 5:31 PM UTC

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

3 replies

Dan Ebberts
Community Expert
Dan EbbertsCommunity ExpertCorrect answer
Community Expert
Jul 24, 2024 5:31 PM UTC

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

Translate
Participant
Jul 24, 2024 6:21 PM UTC

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

Translate
Community Expert
Jul 24, 2024 4:58 PM UTC

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.

Translate