Script: XML-menu
//Loading the xml file
menuXML = new XML ();
menuXML.load("menu.xml");
menuXML.ignoreWhite = true;
menuXML.onLoad = function (success){
if (success){
//accessing the important parts step by step
menuItem = menuXML.firstChild.firstChild;
myDesign = menuItem.firstChild.attributes['name'];
myUrl = menuItem.firstChild.attributes['action'];
myConsult = menuItem.firstChild.nextSibling.attributes['name'];
myMovie = menuItem.firstChild.nextSibling.attributes['action'];
myContact = menuItem.lastChild.attributes['name'];
myMail = menuItem.lastChild.attributes['action'];
//filling the textfields
linkText.htmlText = ""+myDesign+"";
movieText.htmlText = ""+myConsult+"";
mailText.htmlText = ""+myContact+"";
}
}
//this is the asfunction
function showMovie(thisMovie){
movieLoader.loadMovie(thisMovie);
}
|