/ Published in: ActionScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function addComma(num:Number):String { var tmp = num.toString(); if(tmp.length > 3) { return arguments.callee(tmp.substring(0, tmp.length - 3)) + "," + tmp.substring(tmp.length - 3, tmp.length); } else { return tmp; } }