Hi guys and girls,
I am making a dynamic list of links that's created through XML.
I have two problems:
1. When I duplicate the MCs, the Duplicated MC doesn't acquire the specified name from the XML and doesn't acquire the _alpha = 0 property. So basically it's not affected, even though the For Statement should assign it as part of the List - at least I think it should.
2. At the very bottom of the code - When you click on the link in the List the XML should fill up the text boxes of the Title and the Description Boxes that's inside the MC Container (folio_box). The For Statement doesn't seem to assign the appropriate childNode number, so the List Links and the XML information for the Title and Description Boxes don't match.
Code:
function listMenu() {
list00._visible = 0;
spXML = my_xml.childNodes[10];
for (l=0; l<spXML.childNodes.length; l++) {
duplicateMovieClip(list00, "list0"+l, this.getNextHighestDepth());
this["list0"+l].pop_box._alpha = 0;
this["list0"+l]._y = list00._y+(25*l);
this["list0"+l].pop_text.text = spXML.childNodes[l].attributes.title;
this["list0"+l].onRollOver = function() {
this._alpha = 80;
};
this["list0"+l].onRollOut = function() {
this._alpha = 90;
};
this["list0"+l].onPress = function() {
this._alpha = 100;
};
this["list0"+l].onRelease = function() {
this._alpha = 80;
text_box._visible = 0;
title_box._visible = 0;
folio_box._visible = 1;
folio_box.desc_box.htmlText = spXML.childNodes[1].attributes.title+"\n"+spXML.childNodes[l];
};
}
}