Activity › Forums › Adobe After Effects Expressions › Dan-Expression for Counting
-
Paul Roper
April 20, 2022 at 4:13 pmWith reference to all that complicated nonsense for adding commas in numbers, I always simply do this:
Number(x).toLocaleString()
…where x is your number. Couldn’t be simpler! For example, bung this in the Source Text of a text layer with a Slider control:
x = effect("Slider Control")("Slider").value.toFixed(0);
"$" + Number(x).toLocaleString()
Reply to this Discussion! Login or Sign Up