For more information about the formatters provided with Flash MX Professional 2004, see
"Schema formatters" in Using Flash.
Example
This example assumes that the field being accessed is using the Number Formatter
(mx.data.formatters.NumberFormatter) provided with Flash MX Professional 2004. This
formatter contains a property named
the decimal point. This code sets the
this formatter.
var myField:DataType = dataGrid.getField("currentBalance");
myField.formatter.precision = 2;
DataType.getAnyTypedValue()
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX Professional 2004.
Usage
dataTypeObject.getAnyTypedValue(suggestedTypes)
Parameters
suggestedTypes
preferred data types for the field.
Returns
The current value of the field, in the form of one of the data types specified in the
suggestedTypes
Description
Method; fetches the current value of the field, using the information in the field's schema to
process the value. If the field can provide a value as the first data type specified in the
suggestedTypes
attempts to extract the field's value as the second data type specified in the
and so on.
If you specify
null
value of the field in the data type specified in the Schema tab of the Component inspector.
Specifying
null
If a value can't be returned in the form of the one of the suggested types, it is returned in the type
specified in the Schema tab.
precision
precision
An array of strings that specify, in descending order of desirability, the
array.
array, the method returns the field's value as that data type. If not, the method
as one of the items in the
always results in a value being returned, so only use
that specifies how many digits to display after
property to two decimal places for a field using
array, the method returns the
suggestedTypes
Data binding classes (Flash Professional only)
suggestedTypes
at the end of the array.
null
array,
237
Need help?
Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?