Creating an increasing counter +30,000.

Hawk Teflon

Veteran
I need to create an increasing counter much like Numbers does (Effects > Text > Numbers), but there is a 30,000 cap on it. That's not beneficial, because I need the counter to get to 177,123.29. I tried adding some expressions to bypass that, but they all seem to cap at 30,000. Do you know how to bypass this and allow a higher value?
 
Apparently I was using the wrong search keywords. Upon further search I found this equation that seems to work:

numDecimals = 2;
commas = true;
dollarSign = false;
beginCount = 0;
endCount = 177123.29;
dur = 4;

t = time - inPoint;
s = linear (t, 0, dur, beginCount, endCount).toFixed(numDecimals);

prefix = "";
if (s[0] == "-"){
prefix = "-";
s = s.substr(1);
}
if(dollarSign) prefix += "$";

if (commas){
decimals = "";
if (numDecimals > 0){
decimals = s.substr(-(numDecimals + 1));
s = s.substr(0,s.length - (numDecimals + 1));
}
outStr = s.substr(-s.length, (s.length-1)%3 +1);
for (i = Math.floor((s.length-1)/3); i > 0; i--){
outStr += "," + s.substr(-i*3,3);
}
prefix + outStr + decimals;
}else{
prefix + s;
}

I'm leaving this here in case anyone else needs it. Just change values as necessary.
 
Back
Top