Jeg smider 50 point mere i hvis du kan hjælpe med at få det til at virke !
hele mit script er som følgende :
var dDrop = new Array();
fscommand ("allowscale", "true");
// ====Object to Store XML STRING=============
function dropdown (id, text, url) {
this.id = id;
this.text = text;
this.url = url;
}
// ====Converts XML String to Flash Objects===
function convertXML2Objects () {
// xmlStr = "<dropDown><dNum>2</dNum><dText><b>Køb af kanon</b></dText><ddown><dID>1</dID><dText>Person vogne</dText><dLink>
http://www.mail.yahoo.com</dLink></ddown><ddown><dID>2</dID><dText>Vare vogne</dText><dLink>
http://www.flashkit.com</dLink></ddown></DROPDOWN>";mvh. Lars
// ===== Her er din kode =====
xmlStr = new XML();
xmlStr.onLoad = function(success) {
if (success) {
// do stuff when loaded
}
}
xmlStr.load("1menu.xml");
// ===== Slut for din kode ====
doc = new XML(xmlStr);
xmlDrop = doc.childNodes;
xmlSubDrop = xmlDrop[0].childNodes;
_level0.menu.menuHeader = xmlSubDrop[1].firstChild;
_level0.menu.itemCount = parseInt(xmlSubDrop[0].firstChild);
count = _level0.menu.itemCount+2;
for (i=2; i<count; i++) {
xmlDrops = xmlSubDrop[i].childNodes;
id = dDrop.length;
dDrop[id] = new dropdown(xmlDrops[0].firstChild, xmlDrops[1].firstChild, xmlDrops[2].firstChild);
set ("_level0.menu.item"+dDrop.length+"Label", dDrop[id].text);
set ("_level0.menu.item"+dDrop.length+"Url", dDrop[id].url);
}
}