-
Right justifying a counter expression
Hello,
I am using the expression below for a counter to go from zero to 2,000,000 with commas intact. Issue I am having is that the zero is justified left and the number expands right. Is there anything I can do to the expression so that it is justified right and expands left? Or even a new expression?
Much appreciated.
startValue = 0;
endValue = 2000000;
dur = 1.75; //secondss = "" + Math.round(linear(time,5,dur,startValue,endValue));
if (s.length > 6)
s.substr(0,s.length-6) + "," + s.substr(-6,3) + "," + s.substr(-3,3)
else if (s.length > 3)
s.substr(0,s.length-3) + "," + s.substr(-3,3)
else
s