The solution is to use a line like
myFile = new File(pathAsString);
so use the File(path) constructor. Then you will be able to write files in the application directory. Solution found at http://exaflood.de/syrotech/air-securityerror-filewriteresource/.
Hi, this is how I solved/hacked the problem.
var filePath:String = "app:/" + FileNames.DATA_COMMENTS_DIR + "/" + fileName;
North America
Europe, Middle East and Africa
Asia Pacific