| Package | mx.formatters | 
| Class | public class CurrencyFormatter | 
| Inheritance | CurrencyFormatter    Formatter   Object | 
alignSymbol property.
  The currency symbol can contain multiple characters,
  including blank spaces.
  
  If an error occurs, an empty String is returned and a String that describes 
  the error is saved to the error property. The error 
  property can have one of the following values:
"Invalid value" means an invalid numeric value is passed to 
    the format() method. The value should be a valid number in the 
    form of a Number or a String."Invalid format" means one of the parameters contains an unusable setting.
Hide MXML SyntaxThe <mx:CurrencyFormatter> tag
  inherits all of the tag attributes of its superclass,
  and adds the following tag attributes:
  <mx:CurrencyFormatter
    alignSymbol="left|right" 
    currencySymbol="$"
    decimalSeparatorFrom="."
    decimalSeparatorTo="."
    precision="-1"
    rounding="none|up|down|nearest"
    thousandsSeparatorFrom=","
    thousandsSeparatorTo=","
    useNegativeSign="true|false"
    useThousandsSeparator="true|false"
 />  
  
  
  See also
| Property | Defined By | ||
|---|---|---|---|
| alignSymbol : String 
      Aligns currency symbol to the left side or the right side
	  of the formatted number.  | CurrencyFormatter | ||
![]()  | constructor : Object 
	 A reference to the class object or constructor function for a given object instance.  | Object | |
| currencySymbol : String 
      Character to use as a currency symbol for a formatted number.  | CurrencyFormatter | ||
| decimalSeparatorFrom : String 
      Decimal separator character to use
	  when parsing an input string.  | CurrencyFormatter | ||
| decimalSeparatorTo : String 
      Decimal separator character to use
	  when outputting formatted decimal numbers.  | CurrencyFormatter | ||
![]()  | defaultInvalidFormatError : String [static] 
	  Error message for an invalid format string specified to the formatter.  | Formatter | |
![]()  | defaultInvalidValueError : String [static] 
	  Error messages for an invalid value specified to the formatter.  | Formatter | |
![]()  | error : String 
	  Description saved by the formatter when an error occurs.  | Formatter | |
| precision : Object 
      Number of decimal places to include in the output String.  | CurrencyFormatter | ||
![]()  | prototype : Object [static] 
	 A reference to the prototype object of a class or function object.  | Object | |
| rounding : String 
      How to round the number.  | CurrencyFormatter | ||
| thousandsSeparatorFrom : String 
      Character to use as the thousands separator
	  in the input String.  | CurrencyFormatter | ||
| thousandsSeparatorTo : String 
      Character to use as the thousands separator
	  in the output string.  | CurrencyFormatter | ||
| useNegativeSign : Object 
      If true, format a negative number 
	  by preceding it with a minus "-" sign.  | CurrencyFormatter | ||
| useThousandsSeparator : Object 
      If true, split the number into thousands increments
	  by using a separator character.  | CurrencyFormatter | ||
| Method | Defined By | ||
|---|---|---|---|
	  Constructor.  | CurrencyFormatter | ||
[override] 
      Formats value as currency.  | CurrencyFormatter | ||
![]()  | 
	 Indicates whether an object has a specified property defined.  | Object | |
![]()  | 
	 Indicates whether an instance of the Object class is in the prototype chain of the object specified 
	 as the parameter.  | Object | |
![]()  | 
	 Indicates whether the specified property exists and is enumerable.  | Object | |
![]()  | 
     Sets the availability of a dynamic property for loop operations.  | Object | |
![]()  | 
	 Returns the string representation of this object, formatted according to locale-specific conventions.  | Object | |
![]()  | 
	 Returns the string representation of the specified object.  | Object | |
![]()  | 
	 Returns the primitive value of the specified object.  | Object | |
| alignSymbol | property | 
alignSymbol:String
      Aligns currency symbol to the left side or the right side
	  of the formatted number.
      Permitted values are "left" and "right".
	 
      
 The default value is "left".
    public function get alignSymbol():String    public function set alignSymbol(value:String):void| currencySymbol | property | 
currencySymbol:StringCharacter to use as a currency symbol for a formatted number. You can use one or more characters to represent the currency symbol; for example, "$" or "YEN". You can also use empty spaces to add space between the currency character and the formatted number. When the number is a negative value, the currency symbol appears between the number and the minus sign or parentheses.
 The default value is "$".
    public function get currencySymbol():String    public function set currencySymbol(value:String):void| decimalSeparatorFrom | property | 
decimalSeparatorFrom:StringDecimal separator character to use when parsing an input string.
 The default value is ".".
    public function get decimalSeparatorFrom():String    public function set decimalSeparatorFrom(value:String):void| decimalSeparatorTo | property | 
decimalSeparatorTo:StringDecimal separator character to use when outputting formatted decimal numbers.
 The default value is ".".
    public function get decimalSeparatorTo():String    public function set decimalSeparatorTo(value:String):void| precision | property | 
precision:Object
      Number of decimal places to include in the output String.
	  You can disable precision by setting it to -1.
	  A value of -1 means do not change the precision. For example, 
	  if the input value is 1.453 and rounding 
	  is set to NumberBaseRoundType.NONE, return 1.453.
	  If precision is -1 and you set some form of 
	  rounding, return a value based on that rounding type.
	 
      
 The default value is -1.
    public function get precision():Object    public function set precision(value:Object):void| rounding | property | 
rounding:String
      How to round the number.
	  In ActionScript, the value can be NumberBaseRoundType.NONE, 
	  NumberBaseRoundType.UP,
	  NumberBaseRoundType.DOWN, or NumberBaseRoundType.NEAREST.
	  In MXML, the value can be "none", 
	  "up", "down", or "nearest".
	 
	  
 The default value is NumberBaseRoundType.NONE.
    public function get rounding():String    public function set rounding(value:String):voidSee also
| thousandsSeparatorFrom | property | 
thousandsSeparatorFrom:StringCharacter to use as the thousands separator in the input String.
 The default value is ",".
    public function get thousandsSeparatorFrom():String    public function set thousandsSeparatorFrom(value:String):void| thousandsSeparatorTo | property | 
thousandsSeparatorTo:StringCharacter to use as the thousands separator in the output string.
 The default value is ",".
    public function get thousandsSeparatorTo():String    public function set thousandsSeparatorTo(value:String):void| useNegativeSign | property | 
useNegativeSign:Object
      If true, format a negative number 
	  by preceding it with a minus "-" sign.
	  If false, format the number
	  surrounded by parentheses, for example (400).
	 
      
 The default value is true.
    public function get useNegativeSign():Object    public function set useNegativeSign(value:Object):void| useThousandsSeparator | property | 
useThousandsSeparator:Object
      If true, split the number into thousands increments
	  by using a separator character.
	 
      
 The default value is true.
    public function get useThousandsSeparator():Object    public function set useThousandsSeparator(value:Object):void| CurrencyFormatter | () | Constructor | 
public function CurrencyFormatter()Constructor.
| format | () | method | 
override public function format(value:Object):String
      Formats value as currency.
	  If value cannot be formatted, return an empty String 
	  and write a description of the error to the error property.
	 
      
Parameters
value:Object — Value to format.
	 
       | 
String — Formatted string. Empty if an error occurs.
      |