-
Counter to billions with slider control
I need to build a counter that will reach 102,456,367,670. In looking on the web I ran across Dan’s expression;
val = effect(“Slider Control”)(“Slider”);
numDec = 0; // digits to right of decimal
numDigit = 2; // digits to left of decimal
if (val < 0) sign = “-” else sign = “”; s = Math.abs(val).toFixed(numDec); while (s.length < numDigit + numDec + 1) s = “0” + s; sign + sI’m a novice at expressions but it appears that the slider effect will only allow me to go to 1,000,000. I like the idea of the slider because I want to keyframe the counter to the VO. Any suggestions?
I’d also like to display the number with commas.
Appreciate all the help.
David.