Common workflow for the XMLConnector component
The following procedure outlines the typical workflow for the XMLConnector component.
To use an XMLConnector component:
Add an instance of the XMLConnector component to your application and give it an
1.
instance name.
Use the Parameters tab of the Component inspector to enter the URL for the external XML
2.
data source that you want to access.
Use the Schema tab of the Component inspector to specify a schema for the XML document.
3.
Note: You can use the Import Sample Schema button to automate this process.
Use the Bindings tab of the Component inspector to bind data elements (
4.
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.
Add a trigger to initiate the data binding operation by using one of the following methods:
5.
Attach the Trigger Data Source behavior to a button.
Add your own ActionScript to call the
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
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
XMLConnector.trigger()
trigger()
mx.data.components.XMLConnector
Description
Initiates a remote procedure call.
XMLConnector component (Flash Professional only)
params
method on the XMLConnector
and
)
results
895
Need help?
Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?
Questions and answers