View Full Version : [AS2] write txt file - locally
I've got a txt file on hard drive and I'm loading some variables from there.
What I want to do is to alter the txt file from swf. Change the variables in it.
How can I achieve this?
Both txt and swf will run on user's computer.
11-23-2009, 01:20 PM
as long as you dont running it on a local webserver and use a server-side script its not possible..
The swf is running on user's pc through a flash player, is not running on any server!
I just have the mytext.txt and the myflash.swf in the same folder, I'm importing some variables from txt , edit them, and then I want to save them back. Thats all.
Appreciate your help.
Read through this (Saving to a text file offline)...
Or maybe look into Shared Objects as an alternative as well.
Is it possible or impossible to do that in as2 without 3rd party software?
What about as3?
:confused: If you read the link(s) you should be able to answer that.
I think i'm going local shared objects..
1. If user (or some cleaning software) deletes LSO stored data on his computer, all saves are gone forever, right? :/
2. Do LSO works on linux or mac systems?
12-16-2009, 03:07 PM
Yes and Yes... :)
nice, im happy about the second one :)
I want my local swf movie to get updated - to get new variables through internet.
(some pretty vital variables for the movie)
What's your opinion? Is LSO best idea?
12-16-2009, 03:19 PM
Why not save it on the server if that's something that's vital??? That way, you know that you can rely on the existence of the variable whereas you can always delete the LSO locally...
Every user is gonna have different variables depending on they will.
In addition I wouldn't like an internet connection to be necessary in order for the swf to run correctly
12-17-2009, 04:15 PM
That's when you make your server side script to make each entries unique...
If you don't want to rely on the Internet connection, a LSO is the only way that is free... Or use a third party projector tool to save a proper text file or sort...
vBulletin® v3.8.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.