6.
Load a sample of the data source's schema: with the XMLConnector instance still selected,
in the Component inspector click the Schema tab and follow these steps:
a.
Select
results : XML
b.
Click the Import a Schema from a sample XML file button.
c.
Select the dinner_menu.xml file from the dialog box that appears.
The XML file's schema structure appears in the Schema tab.
7.
Expose the XMLConnector's
DataSet's
dataProvider
these steps:
a.
On the Bindings tab of the Component inspector, click the plus (+) sign and in the
dialog box, select
b.
On the Bindings tab again, click Bound To, click the magnifying glass icon, select
DataSet, and select
Each time you create a binding, you perform at least these two basic steps.
8.
Populate the data grid with the XML data by binding the XML data—through the DataSet
component—to the data grid. Select the DataSet component and click the Bindings tab.
You see the binding to the
bindings:
a.
Bind the DataSet's
property: click the plus (+) sign, select the
Bound To, click the magnifying glass icon, select DataGrid, then select the
dataProvider:Array
b.
Bind the DataSet's
property: click the plus (+) sign, select the
Bound To, click the magnifying glass icon, select DataGrid, then select the
selectedIndex:Number
9.
Set up the button to load data into the data grid. Click layer 1 in frame 1 of the Timeline
and open the Actions panel. Add the following code to the first frame:
form = new Object();
form.click = function(eventObj){
xmlConn.trigger();
}
loadData.addEventListener("click", form);
10.
Save and test the application. Click Load Data. The data from the XML file is loaded into
the 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
binding" on page
392
Data Integration (Flash Professional Only)
from the Schema tab top pane.
property for data binding and bind it to the
array
property. With the XMLConnector component selected, follow
.
food:array
dataProvider:Array
instance that you just added. Now, add two new
xmlConn
property to the DataGrid's
dataProvider
property. Select
selectedIndex
property.
407.
.
dataProvider:Array
for the direction.
out
property to the DataGrid's
selectedIndex:Number
dataProvider
property, click
selectedIndex
property, click
"Creating an indexed
Need help?
Do you have a question about the FLASH 8-USING FLASH and is the answer not in the manual?