Hey there! Yea, I know this is a dead thread but I had to implement it for a game and found a simple solution. If it helps anyone looking, cool!
I can whip up a capx if needed, but I think it'll be pretty simple to explain.
For example, if the number you need to display is in a variable 'cash', follow these steps:
1. Test to make sure the cash value is large enough
Ex: if floor(cash/1000) => 1
2. divide cash by 1000 and store the result in a separate variable like 'cash_thousands'
Ex: cash_thousands = floor(cash/1000)
3. subtract the thousands from the 'cash' value
Ex: subtract (cash_thousands * 1000) from cash
Note: it's probably wise to keep the original 'cash' value, the total for the game, in a safe spot and use temporary variables elsewhere.
4. pad the remaining hundreds and ones and store in a text variable (we'll call it 'cash_display').
Ex: set cash_display to cash_thousands & "," & zeropad(cash,3)
Note: you can also just display the number variables directly with the comma, if needed.
That's it. If you need bigger numbers, follow the same steps and make a cash_millions variable, dividing the original value by 1000000 and so on.
If I goofed up, please call me on it... but I think this way is pretty simple.