waffe
January 22, 2003, 3:18am
1
I am loading an array into flah with loadVars. I split the array up into many sections. myArray*[0], myArray1, myArray [2] ect…
My questions is how can I output all of one section of the array.
Like all the myArray*[0] to a textbox.
So the text box looks like this;
myArray*[0]myArray*[1]myArray*[2]myArray*[3]
Basicly, I am trying to load an array, and output it in a different order.
:beam:
system
January 22, 2003, 3:39am
3
This is what I’m trying to pull off;
myArray = new Array();
for (i=0; i<this.NUMITEMS; i++) {
var ID = eval("this.ID"+i);
var Link = eval("this.Link"+i);
myArray* = [ID, Link]
var DataProvider = {ID:myArray*[0], link:myArray*[1]};
myArray*[0].join("&");
profileID = myArray*[0]
trace(myArray*[0])
}
Does not work, still outputs and traces the same.
What ya think?
system
January 22, 2003, 3:49am
4
The loop in my last post is not posting correctly.
Just so we know.
system
January 22, 2003, 4:16am
5
join returns the string, it doesnt change your array into one
myString = myArray[0].join("&")
trace(myString)
system
January 22, 2003, 5:16am
6
Almost got what I need. On your last code you have trace command, “trace(myString)” that trace the array how I would like to see it in a textbox.
When I out put to a text box write now, I only get the last string of the array, instead of all the strings being listed, like the trace command.
system
January 22, 2003, 6:34pm
7
Please take a look, you will need to download both files and put them in the same directory. There are further explanations in the fla.
system
January 22, 2003, 6:35pm
8
This is the array I am loading into flash.
system
January 22, 2003, 6:58pm
9
replace
profileID = myIDArrayJ;
trace(myIDArrayJ);
with
profileID += myIDArrayJ;
if (i!=this.NUMITEMS-1) profileID +="&";
system
January 22, 2003, 7:13pm
10
Thank You VERY MUCH, I don’t fully know how it works, but it works perfectly.:beam: