Hi, is it possible to make such thing in flash:
- I have some files on a server, I am connecting to these files trough flash and somehow save them on my computer and next time I want to use them I dont connect to the server I will use the ones stored on my “temp” on my pc
Yes, that is indeed possible.
Yes, you can with SharedObject but it depends on the files, here are some common situations:
1) You have an XML (or another simple text file) on the server which contains information like user preferences for the site (music volume, login info, etc.).
What you can do in this situation is use a SharedObject to store the information on the user’s computer. The next time you need it you can check if it exist locally (on the user’s computer) and if it is use it, if not – download it.
2) You have dynamic text information on the server (like XML generated trough PHP ). Let’s say that this XML contains information about images stored on the server. The problem here’s that you can’t store the XML in a SharedObject because the information in it is dynamic.
However when flash downloads an image from a remote server it’s automagically cached in the user’s computer so you don’t have to worry about bandwidth that much
That’s what I can come up with right now, if I missed something I’m sure the guys here will add it
yeah… I know sharedobjects… I worked with that in the past … but when I said “files” I thought about images , lot of them and yes… they are cached… but not for a long time and not always…
You can load images into ByteArray format via URLLoader, and save ByteArray in SharedObject ( recommend compress it before doing so ).
Loader.loadBytes help you recover BA into images, but you can use BitmapData set/get pixel methods to process it too.
Anyway this gonna request client lots space for SharedObject, depands on how many files you with to save.
In the other hand, you can use FileReference allow users save/load by their own files in their disk space