Array of objects returned from an XMLConnector component
The following illustration
shows an example of using the Component inspector to bind an array of XML nodes,
represented with the XMLConnector component. It assumes that you have imported a
schema for an XML file that contains an array of XML nodes. The illustration on the left
shows the schema of the XML document, the array of XML nodes represented as an
ActionScript array. The illustration on the right shows how the
results.datapacket.row
array is bound to the
property of the
instance of the DataSet
dataProvider
myDataset
component.
Accessing the data
After the data is loaded into the DataSet component and the schema for the DataSet
component has been defined, the data can be accessed. You can access data at runtime or at
design time.
Runtime example.
Accessing the data at runtime is simple. Because the data is loaded as
objects, data is exposed through properties that can be referenced in code. The DataSet
component has a method (
) that lets you make the first item in the array the
DataSet.first
currently selected object.
424
Data Integration (Flash Professional Only)
Need help?
Do you have a question about the FLASH 8-USING FLASH and is the answer not in the manual?
Questions and answers