codice:// la classe cambi cosi class MyXML extends XML { public var path; } /////////////////////////////////////// var menuSpacing:Number = 20; var mio_xml:MyXML = new MyXML(); mio_xml.path = this; mio_xml.ignoreWhite = true; mio_xml.onLoad = function(success) { if (success) { var nodes = this.firstChild.childNodes; for (var i = 0; i<nodes.length; i++) { this.path.menu.menuItem.duplicateMovieClip("menuItem_"+i, i+1); this.path.menu["menuItem_"+i].labelName = nodes[i].attributes.label; this.path.menu["menuItem_"+i].link = nodes[i].attributes.link; this.path.menu["menuItem_"+i]._y = menuSpacing*i; } } else { this.path.labelName = "Caricamento Errato"; } }; mio_xml.load("menu_azienda.xml");

Rispondi quotando