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
|» Level Intermediate|
Rating: 7.67 Votes: 27
|Applications Developer Marconi Australia|
|Download the files used in this tutorial.|
|Download (369 kb)|
|More help? Search our boards for quick answers!|