I've also started trying to figure out how to write files,
which is one of the main reasons I'm using AIR instead of basic Flash. I've started with creating a new player txt
that will save the player var when the player exits (and hopefully more often
than that, just in case of crashes). I
saw some good sample code on StackOverflow, but changing the directory seems to
be messing me up a little. The sample
code put the file on the desktop, but of course I'd rather put files in the
application directory, preferably in the lib folder or somewhere similar. However, that's read-only, it seems, so the
advice I've seen from official documentation says to use the Application
Storage Directory. Makes sense... until
I look for it. It seems to put it in the
middle of nowhere, down a rabbit hole of folders. The documentation says it puts it in a
different folder depending on what system you use (Mac vs. Windows, etc.), but
my goodness, something like the installation directory wouldn't be too hard, would
it?
Oh, well. It works;
that's what matters at the moment. The
file saves so I can move on from that task.
No comments:
Post a Comment