I was trying to save an imagefile to a directory in applicationStorageDirectory of my air project. Created the directory first
var imageDirectory:File = File.ap
Try:
var file:File = File.applicationStorageDirectory.resolvePath("vispics/" + filename);