Wrox Home  
Search P2P Archive for: Go

  Return to Index  

flash_programming thread: grabbing from a txt file


Message #1 by "Sean Trapani" <strapani@u...> on Fri, 7 Mar 2003 19:23:45
Hi,

you could use a delimeter character to separate out the pieces of data 
(use something that won't get used in the data) then in flash, once you've 
made sure that the textfile is loaded, you can use,

myArray = myVariable.split("delimeter_character");

alternatively, is there any reason why the variables can't be created 
separately in the textfile,

myVariable1=data1&myVariable2=data2&myVariable3=data3&

so flash doesn't have to do anything to put the data into different 
variables since the data already arrives like it.

> i would like to use a txt file with a variable ( myVariable= data1, 
d> ata2, data3)

> and in actionscript parse that string into an array. so i could grab 
d> ata1 and put it into one variable and the others into different 
v> ariables. any help?

  Return to Index