Question
Displaying array in text box
I'm trying to bring in variables from a remote shared object
and add them to an array and display those values on stage either
in a dynamic textbox as a variable or using myTextBox.text. I'm
able to pass the values into the swf via the RSO no problem, but
where I'm running into trouble is getting the entire array to show
in the textbox. All I'm getting is the last item that was added to
the array....
var rec_array:Array = new Array();
remote_so.theseCredits = function(someName, credits)
{
userName = someName
theseCredits = credits
displayArray();
}
displayArray = function(){
rec_array.push({name: userName, Credits: theseCredits});
for(i=0; i<rec_array.length; i++){
_root.userCredits.CLIST =(rec_array .name + ", " + rec_array.Credits);
}
}
I know there's an easy solution to this I just can't see the forest for the proverbial trees right now!...
Thanks in advance
jH
var rec_array:Array = new Array();
remote_so.theseCredits = function(someName, credits)
{
userName = someName
theseCredits = credits
displayArray();
}
displayArray = function(){
rec_array.push({name: userName, Credits: theseCredits});
for(i=0; i<rec_array.length; i++){
_root.userCredits.CLIST =(rec_array .name + ", " + rec_array.Credits);
}
}
I know there's an easy solution to this I just can't see the forest for the proverbial trees right now!...
Thanks in advance
jH
