View Full Version : saving variables to a text file
03-21-2001, 01:43 PM
Anyone know how to save my variables to a text file on a users hard drive. We will be deploying our project via CD-ROM. I know Director can do it and I have thought of sending my variables to Director and having director save them out. But I am wondering if there is a better way.
03-22-2001, 12:06 AM
(Thanks to FlashGuru for showing me this one)
HI, they say in Macromedia, this not working for Mac.
In fact if you've done the "save" method, nothing appening as it does with PC. But if you run "Sherlock" and watch for the files modified today, you'l find that: "file exchange had worked", a temporary items fiels had been created, inside there is a temp file (begining with "dftmp" ending with "kkkkkkk--------", in between, 8 caracts.,the same for each session/système + a different one for each "save" you've done.). They say that Director & Flash Projectors are the same, but flash ones don't holds the system communication layer, and you can't save, thats all! Thats why a director projector weigth with nothing inside is more than 1 meg.
Flash for the web, Director for CD, no preferences for flash exe applications... oh my ;¬}
04-06-2001, 06:21 AM
Jesse, I saw you answered a question about saving items to a file, I was wondering, what the code would be to have a button copy text from a text field, and append it to a file??? and could you have that file on a server???
Any info would be great.
05-21-2001, 05:46 AM
I've been trying to develop a questionnaire for my clients. I can send out the variables to my php formmail ... but I'd also want to be able to save the variables on my HD when I go to my customers with just a PC and no internet connection. I've tried other external filesavers for flash like azhell etc. but there are certain limitations. My questionnaire has 180 questions! .need help. thanks
05-21-2001, 07:07 AM
Why can't you use the FSCommand? I made a sample then that ouputs 200 variables with random values toa text file using FSCommand and it worked fine:
&j=190&var0=0&var1=1&var2=2&var3=3&var4=4&var5=5&var6=6&var7=7&var8=8... all the way to 200
05-21-2001, 07:12 AM
but .. as I've told you I've been having problems with FSCommands...
I've put this on my release button.
fscommand ("save", "c:\\hello.txt");
but I never got to see hello.txt
could my OS have somehting to do with it? i'm on w2k.
05-21-2001, 07:18 AM
Not sure about the OS. I guess Win2K is NT based so that could be it... you're running the standalone projector right? FSCOmmands don't work in the browser (this one doesn't at least)
08-08-2001, 10:55 PM
I think saving a text file will not work on the browser. It will work only by running the .SWF file. I want also to save a new text file on the server running on the browser.
Thanks if ever there's a clarification on how to save a txt file on the server.
08-08-2001, 11:00 PM
the fscommand 'sa've wont work through the browser, it is made for the projector. if you want to write files to a server then you have to use server scripts like PHP. search the forums (using the 'search' button above) for 'php write text file'
Okay I have run the test for outputting vars to a text file but it seems to output all vars that flash knows about at that point in time. Say I wanted to output just specific variables how would I go about this, I guess levels are what is required here.
If I output from a level of movie greater than base then I can possibly build up levels of variables which can only be referenced depending on the targeting i am using. This is all a theory, I will test it 2moro, if anyone has any pointers on this though I would appreciate it.
10-18-2001, 01:45 AM
The SAVE command saves vars on the _root so you'd have to delete the vars you didn't want to save, or move them into a child MC, then back again later...
03-06-2007, 09:19 AM
Also, I was just trying this out it it didn't work,
so I did a search and found this: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_16200
Acording to this whey made a Standalone Flash Player Update which disables this command or something like this, so that fscommand is now virtually obsolete.
vBulletin® v3.8.5, Copyright ©2000-2014, Jelsoft Enterprises Ltd.