I was wondering if someone could put this in as3 form for me.
I just can't quite figure it out.
Thanks in advance.Code:onload(){ oxml = new XML(); oxml.ignoreWhite = true; oxml.onload = function(loaded){ if(loaded){ buildMenu(this); }else{ btn0.label.text = "ERROR: no xml data"; } oxml.load("menu.xml"); } } function buildMenu(xmlObj){ var menuNode = xmlObj.firstChild; for(i=0; i<menuNode.childNodes.length; i++){ var itemNode = menuNode.childNodes[i]; var menuItem = (i==0) ? btn0 : btn0.duplicateSprite("btn"+i, i); menuItem.label.text = itemNode.attributes.label; menuItem._link = itemNode.attributes.url; menuItem._y += btn0._height * i; menuItem.trigger.onRelease = function(){ this.getURL(this._link, "_blank"); } } }




Reply With Quote