-
1. Re: file work
kglad Jul 12, 2011 9:56 AM (in response to Robert Barr)if you're using adobe air, you can use the file class.
otherwise, you'll use the urlloader class to call a server-side executable (eg, a php file) that will write the file to your server.
-
2. Re: file work
Andrei1 Jul 12, 2011 10:07 AM (in response to Robert Barr)Also you can enable user to save file on their local hard drive via using FileReference class. This though doesn't have any access to file structure - it behaves exactly like when you save, say, image from a web page with OS' interfaces etc.
-
3. Re: file work
Robert Barr Jul 12, 2011 10:59 AM (in response to kglad)but if I want to write it to the user's computer is that possible?
-
4. Re: file work
Robert Barr Jul 12, 2011 11:01 AM (in response to Robert Barr)What I want to do is save the XML information that I built to an XML file on the user's computer so that it is specific to that user.
-
5. Re: file work
Andrei1 Jul 12, 2011 11:30 AM (in response to Robert Barr)You can ALLOW USER save it with FileReference. Other wise, unless it is an air application - you cannot save anything on user's harddrive without him being aware that it was saved. SharedObject is, of course, an exception but it is a slippery road because user can always reject/remove this info.
How are you going to reuse this saved file if ever?
-
6. Re: file work
Robert Barr Jul 12, 2011 12:45 PM (in response to Andrei1)It will be the way for the site to access the information concerning their particular dragon each time they log on. That way the information can be concerning their particular dragon and I do not have to keep a large amount of information on the server for each member.
-
-
8. Re: file work
Robert Barr Jul 12, 2011 8:43 PM (in response to kglad)It is nice of you to say that, but could you explain a bit about it. I have tried to understand it but I seem to find it rather confusing.
-
9. Re: file work
Andrei1 Jul 12, 2011 9:02 PM (in response to Robert Barr)Here is documentation for SharedObject:
Also there are tons of tutorials on Internet on how to use it. Here is the first one that comes on Google:
-
10. Re: file work
kglad Jul 12, 2011 10:54 PM (in response to Robert Barr)var so:SharedObject = SharedObject.getLocal("yourso");
if(so.data.whatevervariable){
// use so.data.whatevervariable etc
}
// some place when you have the data that's needed to be saved:
so.data.whatevervariable=thedata;
-
11. Re: file work
Robert Barr Aug 16, 2011 6:10 PM (in response to kglad)But then you have to flush() it, right in order for it to actually be written to the SharedObjects area on their hard drive?
-
12. Re: file work
kglad Aug 16, 2011 10:24 PM (in response to Robert Barr)no, you don't have to apply the flush() method to write to your so. if you apply flush(), data is written to the so immediately. if don't apply flush(), data is written when your swf closes.
p.s. i notice you marked many of your threads as answered but gave noone credit for giving a helpful or correct response. if someone gives a helpful/correct response, you should mark their response.
-
13. Re: file work
Robert Barr Mar 20, 2012 1:48 PM (in response to kglad)Just so taht you know, many of the items I marked as answered were because I got them answered by doing a lot of research elsewhere and finally coming up with the answer. I gave credit where credit was due.
-
14. Re: file work
kglad Mar 20, 2012 1:54 PM (in response to Robert Barr)that's your prerogative.
good luck in the future.