grenadier_teg
10-06-2007, 12:11 PM
Ok I've got this on a AS keyframe, with a MC in the library with the linkage "table".
I've also got a instance of the same MC on the stage with the instance name "table".
The one on the stage shows the info from the xml file in dynamic text boxes, but the ones loaded from the library don't show any info.
I'm guessing it's to do with levels and them overwriting each other but I can't figure it out,
Would appreciate the help
Terrence Rose (NZ)
xml = new XML();
xml.ignoreWhite = true;
xml.onLoad = function() {
nodes = this.firstChild.childNodes;
numOfNodes = nodes.length;
for (i=0; i<numOfNodes; i++) {
_root.table.et.text = nodes[i].firstChild.firstChild;
_root.table.mph.text = nodes[i].firstChild.nextSibling.firstChild;
_root.table.reaction.text = nodes[i].firstChild.nextSibling.nextSibling.firstChild;
}
attachResults = function () {
attach = attachMovie("table", "table", r);
attach._x = 0;
attach._y = table._height*r;
};
for (r=0; r<numOfNodes; r++) {
attachResults();
}
};
date = '04-10-07';
xml.load('results'+date+'.xml');
dateTitle.text = date
I've also got a instance of the same MC on the stage with the instance name "table".
The one on the stage shows the info from the xml file in dynamic text boxes, but the ones loaded from the library don't show any info.
I'm guessing it's to do with levels and them overwriting each other but I can't figure it out,
Would appreciate the help
Terrence Rose (NZ)
xml = new XML();
xml.ignoreWhite = true;
xml.onLoad = function() {
nodes = this.firstChild.childNodes;
numOfNodes = nodes.length;
for (i=0; i<numOfNodes; i++) {
_root.table.et.text = nodes[i].firstChild.firstChild;
_root.table.mph.text = nodes[i].firstChild.nextSibling.firstChild;
_root.table.reaction.text = nodes[i].firstChild.nextSibling.nextSibling.firstChild;
}
attachResults = function () {
attach = attachMovie("table", "table", r);
attach._x = 0;
attach._y = table._height*r;
};
for (r=0; r<numOfNodes; r++) {
attachResults();
}
};
date = '04-10-07';
xml.load('results'+date+'.xml');
dateTitle.text = date