views:

111

answers:

1

I can't seem to find anything that would let me to easily show a Number in a label, textinput, etc. with comma separation.

like in a label, show number 123456.78 as 123,456.78

[Bindable]
private var num:Number = 123456.78;

<mx:Label text={num} />

Obviously I could just create a function, but is there a more simple way?

thanks

+4  A: 

Check out ActionScript's NumberFormatter class. (mx.formatters.NumberFormatter)

Robusto
There is an example of the NumberFormatter in Tour de Flex: http://flex.org/tour
James Ward