Bike Trips Sample Application: Using the XMLConnector Component in Flash MX Professional 2004
Leo Schuman, J.D.
Macromedia Regional Master Instructor
Schooner Technical Media
Table of Contents
- Introduction
- Getting Started: Examining the Bike Trips Application and Its Data
- Configuring the Application to Use the XMLConnector Component
- Binding XML Data to a ComboBox Component
- Creating ComboBox Labels Using XML Data
- Displaying and Updating a Trip Description in a TextArea Component
- Displaying and Updating a Formatted Cost in a TextInput Component
- Displaying and Updating a Graphic in a Loader Component
- Summary and Related Articles and Resources
Macromedia Flash has been happily consuming XML packets since Flash 5. However, now you can take XML data and display it in Flash easier than ever using the XMLConnector component and the new dynamic data binding features in Flash MX Professional 2004. In this tutorial, I present one way to quickly and easily create an XML data-driven interface in Flash MX Professional 2004, without using a single line of hand-written ActionScript. Of course, you could also do everything here using hand-written ActionScript, but that approach is not convenient for all Flash developers. Flash MX Professional 2004 now gives you a choice.
This tutorial covers:
- Configuring the XMLConnector component and its schema
- Binding complex data to the ComboBox component
- Dynamically binding text data to TextInput and TextArea components
- Formatting dynamically bound data
- Dynamically binding images to the Loader component
This tutorial uses materials from one section of the new, comprehensive Macromedia Authorized Training course:
Macromedia Authorized Training: Flash MX 2004: Application Development
Requirements
To complete this tutorial you will need to install the following software and files:
Macromedia Flash MX Professional 2004
Download sample files for this tutorial
xml_connector.zip (2.59 MB)
Level of Experience Required: Intermediate
To complete this tutorial successfully:
- You are familiar with Flash.
- You've seen XML and understand why data-driven web applications are useful.
In the tutorial, you will learn what data binding means in Flash MX 2004, and how dynamic data binding helps components respond to user input.