from http://livedocs.adobe.com/flex/2/langref/mx/formatters/NumberFormatter.html
Mx.formatters package Public class NumberFormatter Inheritance NumberFormatter Inheritance Formatter Inheritance Object class
The NumberFormatter class formats a valid number by setting decimal rounding and precision, thousands separator, and negative sign.
If you use both rounding and precision properties, rounding is applied first, and then you specify the decimal length using the specified precision value. This allows you to round a number and still have a finite decimal number; for example, 303.99 = 304.00.
If an error occurs, an empty string is returned and the String string describing the error is stored in the error property. The error property can have one of the following values:
- "Invalid value" means that an invalid numeric value is passed to the format () method. The value must be a valid number in the form of a number or a string.
- "Invalid format" means that one of the parameters contains unsuitable parameters.
MXML Syntaxcollapsed Show MXML Advanced Syntax Hide MXML Syntax
A tag inherits all the tag attributes of its superclass and adds the following tag attributes:
<mx:NumberFormatter decimalSeparatorFrom="." decimalSeparatorTo="." precision="-1" rounding="none|up|down|nearest" thousandsSeparatorFrom="," thousandsSeparatorTo="," useNegativeSign="true|false" useThousandsSeparator="true|false"/>
source share