PDA

View Full Version : loading multiple variables from .txt file


flyrod
02-12-2001, 01:44 PM
can i save to and load from a .txt file multiple variables? how does flash recognize that a .txt file has multiple variables in it?

FlashGuru
02-12-2001, 07:52 PM
to read text files into flash they have to be in a set format which is:

var1=value&var2=value&var3=value and so on....

The & represents the start of a new variable.

To save variables to a textfile on your webserver will require some form of middlware ie. php3,perl,asp

To save them to the local machine you can use:

FSCommand("save","filename.txt")

pc only

if you need more let me know!

flyrod
02-12-2001, 08:17 PM
well, i guess my question really is:

how can i save multiple variables to a .txt file from different sources? if i have 17 text boxes labeled txt01-17, how can i write the info contained in all of these boxes to a single .txt file at diferent times? i am making a calendar/schedule keeper for my companys intranet, which will run from the desktop... basically an all-inclusive 'app' to take the place of Outlook, which will launch all regularly used apps, among other things.

anyway, i want to keep the amount of space on the HD to a minimum, fewer .txt files and make it easier on myself to code this monster, which explains my need for a single .txt for each section of the 'app':

schedule, department calendar, e-mail, 'stickyNotes'.

tah!

one other thing:

how can i get Flash to update a textBox from info JUST entered? user inputs data into schedule for February 11, 2001 @ 3:00 pm. press 'SAVE' button and info is then updated instantly to a predetermined textField.

the way it works now, i have to press a button to update the data into the text field, but can i use the same button to set the text into a .txt file AND read from the same .txt files @ the same time? like i said, @ the moment, i have to press the 'SAVE' button twice to make this happen; once to save the data and again to load it.

thanks