Saving Adobe air on offline flash games
How do Adobe Air functions in saving the state of an offline flash game on a local computer? Can anyone help me?
How do Adobe Air functions in saving the state of an offline flash game on a local computer? Can anyone help me?
There are limits to how much you can store in a localobject, but if it's just basic variables, it shouldn't be a big deal. Keep in mind users with the firefox plugin "better privacy" will very easily accidentally nuke all their save files whenever they close the browser.Your best bet with Adobe AIR is to use the FileReference and File classes from the API to write out data to a text file. Now, you'll have a special directory you'll have to write to – you can't just write anywhere, for instance, inside of the program's install directory is off-limits because of OS read/write permissions. So, either you'll have to have the user specify a directory, or you'll have to put it in your app's default data directory, which is something like C:usersappdatablahblahYourAppName on windows, etc, and different on each Os.If you use this method, you can also read/write binary data – for instance, you can easily write out legal PNG files, or any other arbitrary binary blob. Adobe AIR app is basically like Adobe JAVA, sort of. It's basically a super-flash-player, that's installed on the person's computer as a runtime VM. Adobe has made it so that it's *mostly* automatic and seamless to install Adobe AIR – it's one of those things that as soon as you try to start the application it prompts you then installs/updates to the latest version of AIR in the background.
1) Keep working in Flash like you like, without major changes
2) Get some sexy new features to do stuff vanilla Flash won't let you do
3) Write some save files out to data
4) Not have to muck about with SharedObject
5) Etc.
There is one thing that you will have to put in mind when saving those offline flash games on a local computer, and that is that games should be portable and therefore be able to be executed on an offline machine. Otherwise some games may be supported by the remote server and once you transfer them to your computer they will cease functioning because there will be components that will be missing.
You will also need to make sure that your computer has flash players, for those are flash games and they will need flash player to be installed on your computer for them to work.
-Experttechyv
Â