Lesson 6. Using Remote XML Data with Controls

What You Will Learn

In this lesson, you will:

  • Create an HTTPService object that converts data into an ArrayCollection

  • Use an ArrayCollection as a data provider for ComboBox and List controls

  • Understand security issues involved with retrieving data into Flash Player

  • Create an HTTPService object that converts data into an XMLListCollection

  • Use an XMLListCollection to populate a Tree control

  • Use ECMAScript for XML (E4X) functionality to manipulate XML

  • Create an object and use the object's methods to remove data in an ArrayCollection

Approximate Time

This lesson takes approximately 2 hours and 30 minutes to complete.

Lesson Files

Media Files:


Starting Files:







Completed Files:







In this lesson, you will begin to connect the grocery applications to remote data. In the e-commerce application, you will access remote XML data and use them to populate the grocery item interface you created in earlier lessons. In the DataEntry application, you will use a Tree control to enable users to easily display details of grocery items. In the Dashboard application, you will dynamically populate a ComboBox control with remote XML data.

A Tree control populated with remote XML data and used to display details from a particular node of the Tree

You will populate the control by using the HTTPService class to load remote XML data. The data could exist on a remote server, or in external files on the same server, but the data is remote to the application. The data will be transmitted through the HTTP protocol. You will work with this XML data in several formats. By default the data is parsed into an ArrayCollection, which is a special featured array, and you will also use functionality from the ECMAScript for XML (E4X) implementation that implements XML as a native data type in ActionScript.

To put this data to actual use, you will use it as a source for controls that take complex data structures as their data provider. These controls enable you to easily display complex data sets and enable the user to navigate these data sets. You will use the List, ComboBox, and Tree data provider controls in this lesson.

Adobe Flex 2.Training from the Source
Adobe Flex 2: Training from the Source
ISBN: 032142316X
EAN: 2147483647
Year: 2006
Pages: 225

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net