User Guide

XMLConnector component (Flash Professional only) 895
Common workflow for the XMLConnector component
The following procedure outlines the typical workflow for the XMLConnector component.
To use an XMLConnector component:
1.
Add an instance of the XMLConnector component to your application and give it an
instance name.
2.
Use the Parameters tab of the Component inspector to enter the URL for the external XML
data source that you want to access.
3.
Use the Schema tab of the Component inspector to specify a schema for the XML document.
Note: You can use the Import Sample Schema button to automate this process.
4.
Use the Bindings tab of the Component inspector to bind data elements (params and results)
from the XML document to properties of the visual components in your application.
For example, you can connect to an XML document that provides weather data and bind the
Location and Temperature data elements to label components in your application. The name
and temperature of a specified city appears in the application at runtime.
5.
Add a trigger to initiate the data binding operation by using one of the following methods:
Attach the Trigger Data Source behavior to a button.
Add your own ActionScript to call the trigger() method on the XMLConnector
component.
Create a binding between an XML parameter and a UI control and set its Kind property to
AutoTrigger. For more information, see “Schema kinds” in Using Flash.
For a step-by-step example that connects and displays XML using the XMLConnector
component, see “XML Tutorial: Timesheet” in the Data Integration tutorials at
www.macromedia.com/go/data_integration.
XMLConnector class (Flash Professional only)
Inheritance RPCCall > XMLConnector
ActionScript Class Name mx.data.components.XMLConnector
The XMLConnector class lets you send or receive XML files using HTTP. You can use
ActionScript to bind other components to a data source that returns XML data, allowing
communication between the components.
Method summary for the XMLConnector class
The following table lists the method of the XMLConnector class.
Method Description
XMLConnector.trigger() Initiates a remote procedure call.