MACROMEDIA FLASH MX 2004-USING FLASH Use Manual page 262

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

Advertisement

There are several ways to define the schema for a component. Here are the most common ways:
For an XMLConnector component, you can import an XML sample file to define the schema.
See
"Connecting to XML data with the XMLConnector component (Flash Professional only)"
on page
277.
For a WebServiceConnector component, you can import the WSDL for a web service to
define the schema. See
component (Flash Professional only)" on page
For a DataSet component, which is typically the intermediary component between your
connector components and UI components, you define the schema using the Schema panel.
See
"Adding a component property to a schema" on page 262
schema item" on page
For UI components, the schema is predefined within the component. You can modify the
schema to create additional bindable properties, as shown in
a schema" on page
Adding a component property to a schema
You typically add component properties to a schema for the following reasons:
To make an existing component property bindable. You can make any component property
bindable if you add it to the schema.
To define the fields of a DataSet component to describe expected data fields. Most commonly,
you need to define the data type for an expected field, but there are numerous other properties
you can set. For more information, see the examples in
"Schema item settings" on page
The following example illustrates how you make an existing component property bindable by
adding the component property to the component's schema. In the example, you create an
application that uses a CheckBox component to indicate whether a TextInput component is
editable. Because the TextInput component's schema does not initially contain the
property, you add the
To add a component property to a schema to make the property bindable:
Add a TextInput component and a CheckBox component to your application, and give them
1.
instance names.
Select the TextInput component, and click the Schema tab on the Component inspector.
2.
Click the Add a Component Property (+) button at the upper left of the Schema tab to add a
3.
component property.
In the Schema Attributes pane (the bottom pane of the Schema tab), enter editable for the field
4.
name value and select Boolean for the data type value.
Click the Bindings tab, and click the Add Binding (+) button to add a binding.
5.
In the Add Binding dialog box, select the
6.
In the Binding Attributes pane at the bottom of the Bindings tab, click the Bound To item
7.
under Name, and click the magnifying glass icon across from the Bound To item under Value.
262
Chapter 14: Data Integration (Flash Professional Only)
"Connecting to web services with the WebService connector
263.
262.
289.
property to the schema to bind it to the CheckBox component.
editable
274.
and
"Adding a component property to
"Accessing the data" on page 284
property, and click OK.
editable
"Adding a schema field to a
editable
and

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash mx 2004 - actionscript

Table of Contents