Hi all,
I don’t get this, my menu shows the menuItems after i reload the page, not the first time.
on frame 1 i have
xmlSettings = new XML();
xmlSettings.ignoreWhite = true;
xmlSettings.onLoad = loadXML;
xmlMenuPath = "settings.xml";//
xmlSettings.load(xmlMenuPath);
function loadXML(success) {
if (success) {
var xmlNode:XMLNode = this.firstChild;
var menuItems = xmlNode.childNodes[0].childNodes;
for (var i = 0; i<menuItems.length; i++) {
menuArray.push(menuItems*.firstChild.nodeValue.toUpperCase());
gotoArray.push(menuItems*.attributes["gotoURL"]);
}
} else {
content = "file not loaded!";
}
}
function ini() {
for(i=0;i<menuArray.length;i++) {
var curr_item:MovieClip;
curr_item = this["menuItem"+i];
curr_item.gotoURL = gotoArray*;
curr_item.txtMC.menuTxt.text = menuArray*;
curr_item.onRollOver = over;
curr_item.onRollOut = out;
curr_item.onRelease = goto;
curr_item.onEnterFrame = setBG;
}
line.filters = [myDropShadow];
trace("Menu array: "+menuArray);
trace("goto array: "+gotoArray);
}
and on frame 5
ini();
stop();
How can i make sure the menuItems are show on first load?
regards