I also fixed a bug were -xxxxxx would display as -,xxx,xxx:
num=effect("Point Control")("Point")[0]; // use the first part of a point for more resolution than a slider
numAsText= ""+num;
dotIndex = numAsText.indexOf("."); // check for decimals
if (dotIndex==-1) { dotIndex=numAsText.length; }
formattedText = numAsText.substring(dotIndex-3,dotIndex+3); // +4 for 3 decimals etc.
if (dotIndex>3) {
for (i=dotIndex-3 ; i>0 ; i=i-3) {
extractedText = numAsText.substring(i-3,i);
if (extractedText=="-") {
formattedText = extractedText + formattedText
} else {
formattedText = extractedText + "," + formattedText
}
}
}
formattedText;