View Full Version : OutPut An Array In Parses
waffe
January 21st, 2003, 10:18 PM
I am loading an array into flah with loadVars. I split the array up into many sections. myArray[i][0], myArray[i]1, myArray[i][2] ect...
My questions is how can I output all of one section of the array.
Like all the myArray[i][0] to a textbox.
So the text box looks like this;
myArray[i][0]myArray[i][1]myArray[i][2]myArray[i][3]
Basicly, I am trying to load an array, and output it in a different order.
:beam:
senocular
January 21st, 2003, 10:21 PM
myArray.join("");
waffe
January 21st, 2003, 10:39 PM
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[i] = [ID, Link]
var DataProvider = {ID:myArray[i][0], link:myArray[i][1]};
myArray[i][0].join("&");
profileID = myArray[i][0]
trace(myArray[i][0])
}
Does not work, still outputs and traces the same.
What ya think?
waffe
January 21st, 2003, 10:49 PM
The loop in my last post is not posting correctly.
Just so we know.
senocular
January 21st, 2003, 11:16 PM
join returns the string, it doesnt change your array into one
myString = myArray[0].join("&")
trace(myString)
waffe
January 22nd, 2003, 12:16 AM
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.
:P
waffe
January 22nd, 2003, 01:34 PM
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.
waffe
January 22nd, 2003, 01:35 PM
This is the array I am loading into flash.
senocular
January 22nd, 2003, 01:58 PM
replace
profileID = myIDArrayJ;
trace(myIDArrayJ);
with
profileID += myIDArrayJ;
if (i!=this.NUMITEMS-1) profileID +="&";
waffe
January 22nd, 2003, 02:13 PM
Thank You VERY MUCH, I don't fully know how it works, but it works perfectly.:beam:
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.