/ Published in: ActionScript 3
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
var scoreString:String = String(score); var regex:RegExp = /(\d)(?=(\d\d\d)+$)/; scoreString = scoreString.replace(regex, "$1,");