PDA

View Full Version : placing array items into various text boxes


quinu
02-06-2004, 11:23 AM
I have an array that is being populated by various buttons


order = new Array();

function updateSelection(lastAction){
order.push(curSelection);
}

btn1.onRelease = function(){
curSelection = "Ate apples.";
updateSelection();
}
btn2.onRelease = function(){
curSelection = "Ate pears.";
updateSelection();
}


Here is the problem: On my last frame I am trying to take the items in the array and put them into various text boxes.



for (i in order){
_root["txt"+i].text = _root["order["+ i +"]"];
}


The above script is not working. Can anyone offer a suggestion. I have also tried this with no success.

pixelwit
02-06-2004, 12:06 PM
for (i in order){
_root["txt"+i].text = order[i];
}-PiXELWiT
http://www.pixelwit.com

quinu
02-06-2004, 12:13 PM
Oooooh, I understand. Thank you. I feel smarter now.

pixelwit
02-06-2004, 12:18 PM
Welcome.

-PiXELWIT
http://www.pixelwit.com