View Full Version : How do I output a variable's value to a text file?
red_ryder
01-29-2003, 12:02 PM
Can such a thing be done in Flash?
CyanBlue
01-29-2003, 12:05 PM
Howdy... Welcome to the club... :)
Yup... It can be done in Flash with the help of server side script such as PHP or ASP or whatEver... Basically Flash sends whatever string you want to save to the text file to the server side script and it takes care of the rest...
red_ryder
01-29-2003, 01:48 PM
I'm not publishing my flash file onto the web. It is designed as a standalone executable, let's say a game to be played on a local machine.
I want to write the player's score onto a text file (on the hard disk) when he finishes the game. Can that be done using actionscript?
By the way, thanks for the welcome!
linckx
01-29-2003, 01:53 PM
you might want to do that with shared objects...
began with that once, but never continued, so I don't know if it's very easy or not...
we've got a fine tutorial on that here (http://www.actionscript.org/tutorials/intermediate/SharedObjects/index.shtml)
greetings, robin
CyanBlue
01-29-2003, 01:57 PM
You're welcome... :)
If that is the case, I would like to suggest the use of 'Shared Object' with FMX... It will be whole lot easier if it can be done in F5 though... Shared Object in FMX is much like the cookies in web browser...
These will be a good place you can get more information about this Shared Object...
http://www.macromedia.com/support/flash/action_scripts/local_shared_object/
http://www.macromedia.com/support/flash/ts/documents/local_so.htm
Also there are lots of threads that deals with this Shared Object... You might want to do some searching on the forum...
Good luck... and let us know... :)
flash is designed to not write locally as a web security messure. One of my collegues has used fscommand to open up vb programs for a local presentation (.exe) and if you can pass parameters properly with fscommand you can get that to write locally.
Alternatively use director which can import your preexisting flash and do a lingo setprefs to write locally.
fgf
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.