The problem elements are like this
a)I have a text file that contains strings.each string has special characters($)that will come into play later
eg var1=/"this is a string.$mayavi$2001/"&var2=...etc..
I need to
a)capture these variables in an array say new primary();
b)detect the end of data in file.
c)split this primary array elements along the special characters and populate secondary arrays.
eg primary="this is a string.$mayavi$2001" ;
text="this is a string";
can some kind soul help another in distress.
come on guys I m desperate
somebody please help. I am desperate on this .
proud new daddy!
Well, for starters it looks like you need to use the split() function. Look at this code:
primary="this is a string.$mayavi$2001" ;
splitPrimary = new Array();
splitPrimary = primary.split("$");
And then you have an array, splitPrimary, that has three values,  is "this is a string.",  is "mayavi", and  is "2001". You could then just write more code to assign these values to your other arrays.
hope this helps!
Thanx LuxFx it works great now, but still having problems capturing the external variables into arrays.
Do u have any pointers in that direction?
proud new daddy!
Whenever I pull in an external variable to be used as an array, I format it like this in the text file:
And in Flash, after this imported, I use the split() function to turn it into a real array, like this:
myArray = arrayString.split("|");
The trick is to use a character that is hardly ever used anywhere else, so I use the pipe. You might have had problems using a '$'.
Is this going to help?
hey it helps
thanx a lot i does work luxfx..
Click Here to Expand Forum to Full Width