This simple code compiles in Flash develop, but nothing happens:
var f:File = new File();
f.browseForOpen("fsd");
This simple code compiles in Flash develop, but nothing happens:
var f:File = new File();
f.browseForOpen("fsd");
That code works fine for me in FlashDevelop. Are you certain your project is an AIR app? The File.browseForOpen is only available in AIR: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/filesystem/File.html#browseForOpen%28%29
Alternatively, as their code sample suggests, you could wrap it in a try block and see if you get an error:
try
{
fileToOpen.browseForOpen("Open", [txtFilter]);
fileToOpen.addEventListener(Event.SELECT, fileSelected);
}
catch (error:Error)
{
trace("Failed:", error.message);
}
I might be to do with the security sandbox.
Try to put browseForOpen inside the MouseEvent.CLICK handler for some button:
btn.addEventListener( MouseEvent.CLICK, browseOpen )
function browseOpen( e:MouseEvent ):void
{
f.browseForOpen("fsd");
}