416
Data Integration (Flash Professional Only)
Connecting to XML data with the XMLConnector
component (Flash Professional only)
The XMLConnector component lets you access any external data source that returns or
receives XML through HTTP. A single instance of an XMLConnector component can be
used to make multiple calls to the same operation. To call more than one operation, use a
different instance of an XMLConnector component for each operation. For example, you
would use one instance to connect to a DataSet component and another instance to connect
to a resolver component, as shown in the illustration in the overview at the beginning of
this chapter.
To use the XMLConnector component, you load a sample of your XML document’s schema
into the component. The schema is the structure of the XML document that identifies the
data elements in the document to which you can bind.
To load the schema, you import a sample of the XML data to which you’re connecting. You
can either use an actual sample of real data or, if you know XML scripting, create a sample
yourself. You import that sample XML file using the Component inspector.
Be sure that the sample you use contains all the elements you want for data binding and
accurately represents the real data. Different XML structures result in different schemas. For
example, if your sample contains an array with only one item, Flash won’t know that you need
an index for that array. The array needs to contain at least two items.
To import a sample schema:
1.
Locate the XML file to use as a sample.
2.
Drag an XMLConnector component to the Stage.
3.
Click the Parameters tab in the Component inspector and for the URL parameter, specify
the fully qualified name of the XML data source.
4.
Click the Schema tab in the Component inspector and select
params
or
results
, as
appropriate. Select
results
if the XML sample represents the schema of the results of a
call to the data source.
5.
Do one of the following to import the schema:
■
Click the Import Sample Schema button in the upper right corner of the Schema tab.
■
Click the options menu control in the upper right corner of the Component inspector
and select Import XML Schema from the menu.
Summary of Contents for FLASH 8-FLASH
Page 1: ...Using Flash ...
Page 12: ...12 Contents ...
Page 110: ...110 Using Symbols Instances and Library Assets ...
Page 128: ...128 Working with Color Strokes and Fills ...
Page 156: ...156 Drawing ...
Page 190: ...190 Working with Text ...
Page 224: ...224 Working with Graphic Objects ...
Page 270: ...270 Creating Motion ...
Page 310: ...310 Working with Video ...
Page 362: ...362 Working with Screens Flash Professional Only ...
Page 386: ...386 Creating Multilanguage Text ...
Page 454: ...454 Data Integration Flash Professional Only ...
Page 500: ...500 Publishing ...
Page 534: ...534 Creating Accessible Content ...