Search tutorials
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.85 Votes: 26 |
| » Author |
| Applications Developer Marconi Australia |
| » Download |
| Download the files used in this tutorial. |
| Download (369 kb) |
| » Forums |
| More help? Search our boards for quick answers! |
-
You must have javascript enabled in order to post comments.


Comments
There are no comments yet. Be the first to comment!