In my src directory If have a directory called 'users'. This contains the default settings for a new user. In that directory is a number of xml files, and I can't load them. I'm using:
file = File.applicationDirectory.resolvePath("/users/default.xml");
I've tried moving the 'users' directory up a level so it is at the same level as 'src' but that didn't solve it either. I've also tried using
But that didn't work, although these are read only files so it shouldn't be necessary.
It works fine in the development envionment if I load the files using the old flash commands but that doesn't work in the exported application.
Also I notice when I export the application to an AIR file and install it, there are no subdirectories there, there is no 'users' direcorty visible. Only my AIR app, is everything embeded within that file?
I expect I've missed something really basic but can't see it. Help!!!
Usually, when you build the app, the files go into a bin-debug or
bin-release folder. There are settings to ensure that certain source
folders also get copied into the output directory. If you're not doing that
you probably should as it will be easier to package up and install the app
if everything it needs is within the output directory.
Once you have that done, the path will probably be users/default.xml without
the leading slash.