Loading a ComboBox from a file
by Sas Jacobs
The UI components in Flash MX are very user friendly. You can create forms easily and add elements such as radio buttons, combo boxes and push buttons.
This tutorial deals with the ComboBox component. You can enter the values for the ComboBox directly into your movie using the property inspector. You can also load them from an external data source, the topic of this tutorial.
The tutorial demonstrates how to load a list of web sites into a ComboBox from an external data source. The source could be a text file - including an asp, cold fusion or PHP file - or it could be an XML file.
Loading external information is quite different depending on whether the source is a text file or an XML file. So, the tutorial is divided into two main sections and there are two source files: loadingComboFromText.fla and loadingComboFromXML.fla.
The tutorial is divided into the following parts:
- The ComboBox component
- Loading information from a text file - text file structure
- Connecting the movie to the text file
- Checking that the text file has loaded
- Loading text file information into the ComboBox component
- Adding a change handler
- Loading information from an XML file - XML file structure
- Connecting the movie to the XML file
- Loading XML information into the ComboBox component
The tutorial assumes that you know how to use Flash MX and that you have an understanding of actionscript.
|» Level Intermediate|
Rating: 7.85 Votes: 26
|Applications Developer Marconi Australia|
|Download the files used in this tutorial.|
|Download (369 kb)|
|More help? Search our boards for quick answers!|