User Guide

Data binding classes (Flash Professional only) 213
Data binding classes (Flash Professional only)
The data binding classes provide the runtime functionality for the data binding feature in Flash
MX Professional 2004. You can visually create and configure data bindings in the Flash authoring
environment by using the Bindings tab in the Component inspector, or you can
programmatically create and configure bindings by using the classes in the mx.data.binding
package.
For an overview of data binding and how to visually create data bindings in the Flash authoring
tool, see “Data binding (Flash Professional only)” in Using Flash.
Making data binding classes available at runtime (Flash Professional only)
To compile your SWF file, your library must contain SWC files that contain the byte code for the
data binding classes and web service classes. If you create data bindings in Flash while authoring,
the relevant component classes are automatically added to the library. If you work with data
binding and web services at runtime, you must add the classes to your FLA file’s library. You can
get these SWC files from the Classes common library.
To add the SWC files to your library:
1.
Select the Classes library (Window > Other Panels > Common Libraries > Classes).
2.
Open the library for your document (Window > Library).
3.
Drag the appropriate SWC files (DataBindingClasses, WebServiceClasses, or both) from the
Classes library into your document’s library.
For more information on these classes, see “Binding class (Flash Professional only)” on page 214
and Web service classes (Flash Professional only)” on page 842.
Classes in the mx.data.binding package (Flash Professional only)
The following table lists the classes in the mx.data.binding package:
Class Description
Binding class (Flash
Professional only)
Creates a binding between two endpoints.
ComponentMixins class (Flash
Professional only)
Adds data binding functionality to components.
CustomFormatter class (Flash
Professional only)
The base class for creating custom formatter classes.
CustomValidator class (Flash
Professional only)
The base class for creating custom validator classes.
DataType class (Flash
Professional only)
Provides read and write access to data fields of a
component property.
CHAPTER 6
Components Dictionary