numDecimals = 2;
commas = true;
dollarSign = true;
beginCount = 0
endCount = 5.03
dur = 4;
t = time – inPoint;
s = linear (t, 0, dur, beginCount, endCount).toFixed(numDecimals);
suffix = “”;
if (s[0] == “-“){
prefix = “-“;
s = s.substr(1);
}
if(dollarSign) suffix += “%)”;
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);
}
“(” + outStr + decimals + suffix ;
}else{
“(” + s + suffix;
}
Johnny Cuevas, Editor
Thinkck.com
“I have not failed 700 times. I have succeeded in proving that those 700 ways will not work. When I have eliminated the ways that will not work, I will find the way that will work.”
—THOMAS EDISON on inventing the light bulb.