2 x "For" Loops with XML

Hi there,

I got a issue trying to run 2 “for” statements within the one xml onLoad statement. I can’t see why it doesnt work, though it works fine when there is only one “for” statement. Here’s my code:

myXML.onLoad = function(ok) {
if (ok) {
allData = this.firstChild.childNodes;
for (i=0; i<allData.length; i++) {
newBut = _root.attachMovie(‘contentTemp’, ‘content’+i, i);
newBut._y = -50;
newBut._x = (i30)+30;
}
allOtherData = this.childNodes[15].firstChild;
for (k=0; k<allOtherData.length; k++) {
newBut = _root.attachMovie(‘otherTemp’, ‘other’+k, k);
newBut._y = -50;
newBut._x = (k
20)+20;
}
} else {
trace(‘error’);
}
};
myXML.load(‘myText.xml’);

Are you simply not allowed to run two “for” statements at once? Any ideas?