PDA

Click to See Complete Forum and Search --> : ?How can I save variables to a txt file in MAC? Thnx.



Joy_Cow
06-05-2001, 09:30 AM
This is a project for school, with 3 days to go. If I don't get this, I'm toast.

So, plzzzzz help meeeeee.

So, how can I save my variables onto a txt file on MAC OS.

Thnx in advance.

psychlonex
06-06-2001, 11:06 AM
As far as I know, it doesn't work.

You may be able to do it with applescript, but I've never tried.

Is this a web-based project, or a stand-alone?

If it's web based, you could write a php script that writes the vars to a file,
and then do a load variables in flash. at the end of the php script, after it writes
and closes the file, it could direct the browser to download the text file to the
users drive.
If it's stand-alone I don't have a clue what you have to do!

Good luck!
feel free to email me if you need help setting this up!

Psx

funkybudda
06-06-2001, 02:08 PM
hi,

there's an undocument FS command "save" that Flash can use to save variables to an external text files, it works on the PC side, not sure on the Mac side. What it does is it saves ALL the variables for a particular flash movie, and it will have the typical "&" in between each variables to seperate them just like how you would create the text file manually.
This is perfect for retrieving settings where users had the last time they were in the movie, and all you need is to create a conditional statement to check for certain variables and the flash movie will pick up where the user left off...that is if you script everything else correctly.

thelorax
06-06-2001, 11:15 PM
Where exactly do you find this in flash,,, I looked under FS commands on a mac and nothing about "save" shows up.

lorax



Originally posted by funkybudda
hi,

there's an undocument FS command "save" that Flash can use to save variables to an external text files, it works on the PC side, not sure on the Mac side. What it does is it saves ALL the variables for a particular flash movie, and it will have the typical "&" in between each variables to seperate them just like how you would create the text file manually.
This is perfect for retrieving settings where users had the last time they were in the movie, and all you need is to create a conditional statement to check for certain variables and the flash movie will pick up where the user left off...that is if you script everything else correctly.

funkybudda
06-07-2001, 10:53 AM
hi,

of course nothing shows up...just like doing a FS command ("fullscreen" "true". Actionscript with those commands assumes you are familiar with some of the available FS commands. Actionscript window will not assist you with that. For the save command, you can have it as a on mouseEvent action like this:

on (release) {
fscommand ("save", "mySetting"+i+".txt");
i++;
}

the i variable is used to track which user's file will be saved (obviously more scripting to detect the file will need to be scripted). This is just one way using the FS command "save". My post did indicate it's "undocumented", but works on the PC side at least.