browseForOpen, browseForSave can't open custom directory
hi,
i have a very simple air application that just asks the user to select a file and then opens a dialog to save the file.
The problem that I have is that the browseForOpen dialog doesn't start in the directory specified by the File object. Here's the code:
protected function button1_clickHandler(event:MouseEvent):void {
var siteRoot : String = 'file:///D|/sites/Unnamed Site 45/';
var siteFile : File = new File(siteRoot);
siteFile.addEventListener(Event.SELECT, function(e:Event) {
var selectedFile : File = e.target as File;
var dest : File = new File(siteRoot);
dest = dest.resolvePath(selectedFile.name);
dest.browseForSave('Select where to save the file');
});
siteFile.browseForOpen('Open file');
}
Tested from Flex environment it works fine. When you click the button the OS browse dialog is opened inside the file:///D|/sites/Unnamed Site 45/ folder.
However, once i export the release build, install the application and test again, the browse dialog is always opened in the last folder that I was inside. Not the specified folder.
I believe this happens since I made the update to latest AIR version.
Any help ? Thanks
