Tutorials Home
What's New
Top Rated
Submit
myTutes
Random!
Loading a ComboBox from a file
Author: Sas Jacobs
| Website: http://www.sasjacobs.com |
Connecting the movie to the XML file
Loading information from an XML file requires a different approach to using
a text file, so we'll use a completely new movie with the structure shown below.
We will only need two layers - combo and actions - and a single frame.
Add the following text to the actions layer. It loads the sites.xml file and
then stops the movie. Once the movie has loaded, the LoadCombo function will
load the ComboBox component.
//create a new XML object
thisXML = new XML();
//ignore whitespace in the file
thisXML.ignoreWhite = true;
//call the LoadCombo function when the XML file is loaded
thisXML.onLoad = LoadCombo;
//load the xml file
thisXML.load("sites.xml");
stop();
| » Level Intermediate |
|
|
Added: : 2002-08-13
Rating: 7.64 Votes: 25
Hits: 2138
|
| » Author |
|
Applications Developer
Marconi Australia
|
| » Download |
|
Download the files used in this tutorial.
|
|
Download (369 kb)
|
|
Get conversion and unzipping tools
for PC and Mac here!
|
| » Forums |
|
More help? Search our boards for quick answers!
|
|
Please rate this tutorial, 10 is the top rating, you can also click the
comments link to read/write a review.
|
|
|