12-15-2010 04:03 PM
12-15-2010 04:08 PM
You can browse from an application if that is what you are asking.
12-15-2010 04:16 PM
hey,
from my experience the File object's browse() method is really buggy. It never does what i want it to do. the fileFilters are never applied and sometimes dont work and you cannot change directories from the testing i've done. maybe i missed something but this seems super super buggy.
12-16-2010 05:18 AM
I mean a standard browse dialog like in Windows.
Is there a standard browse dialog present or do I need to make my own?
12-16-2010 05:56 AM - edited 12-16-2010 06:08 AM
hey Tjitte,
Yes there is a standard file browser API / method under the File class called browse(); It will open a dialog up on screen showing you a list of files and when you select a file it will dispatch an Event.SELECT event and with it the file data. Using the following code will cause a dialog to pop up:
import flash.filesystem.File;
(...)
var myFile:File = new File();
myFile.browse();
myFile.addEventListener(Event.SELECT, chooseFile);
(...)
public function chooseFile(e:Event):void
{
trace(e.target.nativePath);
}
You can run it in both the desktop and simulator environments and see the difference. In the simulator you will be wanting more. you are probably better off creating your own. good luck!
for more information on the File class and how to utilize its methods, here are the ASDocs:
http://www.adobe.com/livedocs/flash/9.0/ActionScri
12-16-2010 10:34 AM - edited 12-16-2010 10:35 AM
File.browse() is what i'm looking for but it has some bugs.
It shows for example wrong image thumbnails.
Thank you for your help.
12-16-2010 10:40 AM
yeah unfortunately we have to work with what we have - no matter how little. but if you're ambitious enough you crank out your own API using the File class to do what it cannot do as of right now.
12-16-2010 10:59 AM
Will all the standard dialogs be better in the future?
12-16-2010 11:08 AM - edited 12-16-2010 11:09 AM
This is just the beta stage of the SDK and its really young. As it matues theoretically everyhting will better in the future. But this feature is a required one that definitely will be fixed if playbook wants to be fully capable in every respect. and file browsing is one of those core features that needs to be ironed out with no bugs. So yeah i'd put my money on it being perfected.
01-08-2011 11:27 AM
Does anyone know if the browsefordirectory will be supported?
File.browse shows the dialog for choosing a file in the simulator, but file.browseForDirectory doesnt ![]()