Hello everyone,
I feel this one should be pretty simple but I’ve tried every option I’ve found on here and elsewhere and nothing seems to work. My problem is that I have an array that builds ‘mccontent’ multiple times from an XML, which works fine. I have them attached into the ‘mcmaster’ (empty movie clip to hold them all). The problem is that I can’t seem to get the content within mccontent to load. Do you guys have any idea on what to change so that the text boxes in each mccontent* gets updated?
Here’s the code to help, the ?What is where I can’t figure things out.
var xPosition = 0;
var myXML:XML = new XML ();
myXML.ignoreWhite = true;
var dates:Array = new Array ();
var contents:Array = new Array ();
myXML.onLoad = function (){
var linkname:Array = this.firstchild.childNodes;
for (i=0;i<linkname.length;i++){
dates.push (linkname*.attributes.DATE);
contents.push(linkname*.attributes.CONTENT);
mcmaster.attachMovie ("mccontain", "contain"+i, this.NextHighestDepth());
?What["contain"+i]._x= xPosition;
xPosition = xPosition + 120;
?What["contain"+(i)].txtdate.Txt.text = (dates*);
?What["contain"+(i)].txtcontent.Txt.text = contents*);
}
}
myXML.load ("info.xml");
Thanks a bunch in advance.
Solved. For anyone stumbling upon this thread with the same problem; the correct code is _root.mcmaster[“contain”+i so on so on. Just make sure mcmaster or the master mc is sitting on the stage.