-
Animated number with leading zeros and decimal places
I’m trying to animate a number, linked to a Slider Control, which has leading zeros and decimal places.
This code works quite well for the leading zeros part which I found here…
https://graphicdesign.stackexchange.com/questions/64477/after-effects-custom-counter-expressionval = Math.round(thisLayer.effect("Slider Control")("Slider"));
('0000' + val).slice(-4)
But I’m struggling to figure out how to include decimal places.
In normal cases I’d use this code to change the number of decimal places that I’d like to have displayed but it doesn’t seem to work with this expression.
[0].toFixed(2)Does anyone have a solution please?
Thank you.
Motion Videos UK – We are creative video designers who bring pleasure, meaning and beauty to our small world through film, motion graphics and animation.