GDrider77
02-05-2009, 02:17 PM
Ok, so basically have a simple nav that needs to be populated with XML. I can trace the xml just fine, but trying to get it to poulate the textfields doesnt work.
This code works, but only for the thumb1 which is hard coded, and i dont want to have to hard code each thumb, that is why i have a for loop.
for (var i:int = 0; i < authorList.length(); i++) {
var authorElement:XML=authorList[i];
nav_mc.thumb1.text=bookInput.Book.author.text()[i];
trace(authorElement);
}
this is what i need, which changes thumb1 to thumb[i], but doesnt work? I know this has to be simple, just not getting it.
for (var i:int = 0; i < authorList.length(); i++) {
var authorElement:XML=authorList[i];
nav_mc.thumb[i].text=bookInput.Book.author.text()[i];
trace(authorElement);
}
This code works, but only for the thumb1 which is hard coded, and i dont want to have to hard code each thumb, that is why i have a for loop.
for (var i:int = 0; i < authorList.length(); i++) {
var authorElement:XML=authorList[i];
nav_mc.thumb1.text=bookInput.Book.author.text()[i];
trace(authorElement);
}
this is what i need, which changes thumb1 to thumb[i], but doesnt work? I know this has to be simple, just not getting it.
for (var i:int = 0; i < authorList.length(); i++) {
var authorElement:XML=authorList[i];
nav_mc.thumb[i].text=bookInput.Book.author.text()[i];
trace(authorElement);
}