Workflows For Using The Data Components - MACROMEDIA FLASH MX 2004-USING FLASH Use Manual

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

Advertisement

Next, populate the data grid with the XML data by binding the XML data—through the
8.
DataSet component— to the data grid. Select the DataSet component and click the Bindings
tab. You see the binding to the
bindings:
Bind the DataSet's
a
click the plus (+) sign, select the
magnifying glass icon, select DataGrid, then select the
Select
out
Bind the DataSet's
b
click the plus (+) sign, select the
the magnifying glass icon, select DataGrid, then select the
property.
Set up the button to load data into the data grid. Add the following code to the first frame:
9.
form = new Object();
form.click = function(eventObj){
xmlConn.trigger();
}
loadData.addEventListener("click", form);
Save and test the application. Click Load Data. The data from the XML file is loaded into the
10.
DataGrid.
You've just created your first data integration application, with data dynamically loaded from
an XML file. To add more functionality to this application, see
on page
270.

Workflows for using the data components

This section provides a high-level overview of the steps required to create a Flash application that
can dynamically interact with an external data source. You can find instructions and examples to
complete each step throughout the rest of the chapter.
There are two general workflows: one for connecting to web services or XML documents as your
data source, and one for connecting to an external database.
Workflow for data source from web services or XML documents:
Get the URL of your external data source:
1.
A web service.
An XML document.
Add components to the Stage:
2.
Add a connector component.
Add a DataSet component, which you will bind to your data source and UI components.
Add UI components that will display data to users, such as a DataGrid component.
Add a resolver component.
xmlConn
dataProvider
for the direction.
selectedIndex
instance that you just added. Now, add two new
property to the DataGrid's
dataProvider:Array
property to the DataGrid's
selectedIndex:Number

Workflows for using the data components

dataProvider
property, click Bound To, click the
dataProvider:Array
selectedIndex
property, click Bound To, click
selectedIndex:Number
"Creating an indexed binding"
property:
property.
property:
257

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash mx 2004 - actionscript

Table of Contents