Created
March 30, 2009 11:34
-
-
Save Inviz/87752 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| trace('browse'); | |
| var filter:Array = new Array(); | |
| if (options.typeFilter is Object){ | |
| for (var key:String in options.typeFilter) { | |
| filter.push(new FileFilter(key, options.typeFilter[key])); | |
| } | |
| } else if (options.typeFilter is String) { | |
| var description:String = options.typeFilterDescription || options.typeFilter; | |
| var type:FileFilter = new FileFilter(description, options.typeFilter); | |
| filter.push(type); | |
| } | |
| fireEvent('browse', options.typeFilter); | |
| dialog = (options.multiple) ? new FileReferenceList() : new FileReference(); | |
| dialog.addEventListener(Event.SELECT, handleSelect); | |
| dialog.addEventListener(Event.CANCEL, handleCancel); | |
| try { | |
| var success:Boolean = dialog.browse(); | |
| } catch (e:Error) { | |
| verboseLog('Exception', e.toString()); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment