PDA

View Full Version : saving var to .txt (more questions)


MaxDemian
03-28-2001, 08:09 PM
I would really like to know how to perform this function and have noted the post from erank: "saving variables to a text file". Unfortunately I was unable to apply the solution given in the reply. My dilemma is only slightly more complex.

I am creating an application that requires the user to enter information in multiple text fields (ex. first name. last name, etc.) and want to save these values as either individual txt files or as one whole txt document with all the variable values saved. This will allow the user to quit the application but retrieve her information for another time.

I am sure the solution uses the fscommand - "save" functionality but I can't find any documentation that expands on its use. Any help will be greatly appreciated.

-Max

Jesse
03-28-2001, 11:33 PM
First thing to establish is:
is this going to be run online via the browser or on the Hard Drive of the user via the Flash Projector?

The method is different depending on which you're doing.

Cheers

Jesse

MaxDemian
04-12-2001, 03:47 PM
I was initially asking about saving variables in reference to a local projector. I did indeed figure this out but discoverd the "save" fscommand only works on PC, not on Mac. If there is a way to do this on a Mac I would love to know.

Thanks again,

-Max

zghost
04-23-2001, 09:29 AM
how would this work online through the browser?

thanks, appreciated

zghost

Jesse
04-23-2001, 09:56 AM
zGhost,

Via the browser you can only save variables to your server, you can't save files to the user's hard-disk for security reasons.

Cheers

Jesse

zghost
04-25-2001, 05:45 AM
sorry if i am missing something obvious, but how do you send variable information into the text file. the fs ( "save", "text.txt") creates the text file but i do not know how to place the information into the text file.

thanks
zghost

Jesse
04-25-2001, 08:34 AM
That command will write all variables currently int he flash file out to a text file int he correct form to be imported again:

&variable1=value1&variable2=value2

etc.
It is designed only as a way of 'saving' variables for importing later, not to export text files for use by the user or anything like that.

Cheers

Jesse

zghost
05-05-2001, 09:49 PM
i put together a piece using this technique, but it does not save to the text file on the server when it is run online. is there a way to make it save to the text file when the page is viewed online or does the save command only work locally?

thanks
zghost

one more thing, does anyone know the difference btw loadvariables and loadvariablesNum?

Jesse
05-06-2001, 08:12 AM
VariablesNum = load into level
Variables = load into target MC....

The save method is for local presentations on Windows based PCs ONLY. If you want to do it online you need to use a server side script, see these threads:

http://www.actionscripts.org/forums/showthread.php3?threadid=851
http://www.actionscripts.org/forums/showthread.php3?threadid=749

Cheers

Jesse