MACROMEDIA FLASH MX 2004-USING FLASH Use Manual page 265

Hide thumbs Also See for FLASH MX 2004-USING FLASH:
Table of Contents

Advertisement

Data type and formatter
needs to convert the data to an ActionScript data type, which is a form that the component can
read; this conversion is automatic, depending on the Data Type setting. If the data is a string and
a Formatter setting exists, then the formatter converts the data from string to the specified
ActionScript data type. The Data Type setting also controls whether the data binding engine
inspects the data to see if it's valid and causes events to be generated accordingly. The encoder
then converts the data from the ActionScript-readable form to raw form, and the kind then
finally passes the data to the component.
The processing handled by these four attributes occurs when the data field is accessed with data
binding. It is possible to directly access a component property from your ActionScript code, but
when you do this, you're working with the raw value of the data, not the data value that results
from the action of data types, encoders, formatters, and kinds. For more information, see the
"DataType class (Flash Professional only)" in Using Components.
In many cases, you won't need to edit the settings that are in the bottom pane of the Schema tab.
The following guidelines specify when to change the schema item settings from their default
values:
You always need a kind. The default value for the kind setting is
the Data kind.
You need an encoder when the component does not provide the data in the form you want.
The most common case is the XMLConnector component, or any other component whose
properties are XML data. This is because XML stores all data—including numbers, dates, and
Boolean values—as strings. If you want to use the actual data instead of its string
representation, you use an encoder.
You need a formatter when you want to control how the data is converted to a string, usually
for display purposes.
You need a data type when you want data validation to occur, you want better conversion for
certain data types, or both.
For more information on these schema item settings, see
Working with bindings in the Bindings tab (Flash Professional only)
Once you have imported and defined schemas for your data components, as described in
"Working with schemas in the Schema tab (Flash Professional only)" on page
adding bindings. You use the Bindings tab to add and remove bindings to and from components
and their properties. All the bindings for a component appear here.
When you want to set data into a component, data binding first
, which is equivalent to
none
"Schema item settings" on page
Data binding (Flash Professional only)
289.
260, you can start
265

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash mx 2004 - actionscript

Table of Contents