
Код:
stop();
//create a new XML object
thisXML = new XML();
//ignore whitespace in the file
thisXML.ignoreWhite = true;
//call the LoadChartData function when the XML file is loaded
//thisXML.onLoad = LoadCombo;
//load the xml file
thisXML.load("sites2.xml");
thisXML.onLoad = function(success) {
if (success == true) {
//function LoadCombo(success) {
// if (success) {
//set variables
// var BaseNode=thisXML.childNodes[0];
// var ComboSites = new Array();
// var ComboURLs = new Array();
// var ThisNode;
//add a default item to the combo box
//111.addItem("-- select site --");
//get sites information
// for (i=0; i < BaseNode.childNodes.length; i++) {
// ThisNode = BaseNode.childNodes[i];
// ComboSites[i] = ThisNode.attributes["siteName"];
// ComboURLs[i] = ThisNode.attributes["siteURL"];
//add to combo box
// 1buton.addItem(ComboSites[1],ComboURLs[1]);
// }
// }
//}
//stop();*/
_root.kn.onRelease = function() {
var BaseNode = thisXML.childNodes[0];
var nnnSites = new Array();
var bbbURLs = new Array();
var ThisNode;
for (i=0; i<BaseNode.childNodes.length; i++) {
ThisNode = BaseNode.childNodes[i];
nnnSites[i] = ThisNode.attributes["siteName"];
bbbURLs[i] = ThisNode.attributes["siteURL"];
if (_root.kn._name == nnnSites[i]) {
getURL(bbbURLs[i]);
}
}
};
}
};