hi all,
ok, i’m really having a hard time trying to get this to work, hopefully someone will be kind enough to shed some light on this…
function onLoaded(e:Event):void {
xml = new XML(e.target.data);
var sF:XMLList = xml.tenant.floorN;
var sC:XMLList = xml.tenant.company;
//
sFloor0.appendText(sF.text()[0]);
sCompany0.appendText(sC.text()[0]);
//
sFloor1.appendText(sF.text()[1]);
sCompany1.appendText(sC.text()[1]);
//
sFloor2.appendText(sF.text()[2]);
sCompany2.appendText(sC.text()[2]);
//
sFloor3.appendText(sF.text()[3]);
sCompany3.appendText(sC.text()[3]);
}
the code above outputs exactly what i need it to do to the specific dynamic text fields i’ve assigned, but i was hoping that there is a way to put this in a FOR loop?
this code below works in the output panel
for (var i:Number=0; i<sC.length(); i++) {
trace(sF.text()*);
trace(sC.text()*);
}
but i can’t get it to work with multiple text fields, can somebody please help me out?
thanks
chris