# AS3 Format numbers with comma

**URL:** <https://forum.kirupa.com/t/as3-format-numbers-with-comma/322683>\
**Category:** flash\
**Created:** [May 30, 2011, 2:44pm UTC](https://forum.kirupa.com/t/as3-format-numbers-with-comma/322683 "2011-05-30T14:44:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mvrb](https://avatars.discourse-cdn.com/v4/letter/m/f14d63/32.png) [@mvrb](https://forum.kirupa.com/u/mvrb)\
**Post date:** [May 30, 2011, 2:44pm UTC](https://forum.kirupa.com/t/as3-format-numbers-with-comma/322683/1 "2011-05-30T14:44:36Z")

</div>

Hello there. I’m showing the users score in a textbox. But if the number exceeds 1000 it should show 1.000  
example: 10000000 =\> 10,000,000  
I’ve been searching a lot on Google, but I just can’t make it work. Can anyone help me with this?  
I’ve started something out with this code:  
[http://pastebin.com/a51cP6jT](http://pastebin.com/a51cP6jT)  
Also, if I had the correct function, how would I made it split too if the number was 10.000, 100.000, etc…  
Regards
