flash.events

# FileListEvent - AS3

Package | flash.events
Class | public class FileListEvent
Inheritance | FileListEvent Event Object

Runtime Versions: | AIR 1.0

A File object dispatches a FileListEvent object when a call to the `getDirectoryListingAsync()` method of a File object successfully enumerates a set of files and directories or when a user selects files after a call to the `browseForOpenMultiple()` method.

Related API Elements

File.getDirectoryListingAsync()

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | bubbles : Boolean [read-only] Indicates whether an event is a bubbling event. | Event
|  | cancelable : Boolean [read-only] Indicates whether the behavior associated with the event can be prevented. | Event
|  | constructor : Object A reference to the class object or constructor function for a given object instance. | Object
|  | currentTarget : Object [read-only] The object that is actively processing the Event object with an event listener. | Event
|  | eventPhase : uint [read-only] The current phase in the event flow. | Event
|  | files : Array An array of File objects representing the files and directories found or selected. | FileListEvent
|  | target : Object [read-only] The event target. | Event
|  | type : String [read-only] The type of event. | Event

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | FileListEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, files:Array = null) The constructor function for a FileListEvent object. | FileListEvent
|  | clone():Event Duplicates an instance of an Event subclass. | Event
|  | formatToString(className:String, ... arguments):String A utility function for implementing the toString() method in custom ActionScript 3.0 Event classes. | Event
|  | hasOwnProperty(name:String):Boolean Indicates whether an object has a specified property defined. | Object
|  | isDefaultPrevented():Boolean Checks whether the preventDefault() method has been called on the event. | Event
|  | isPrototypeOf(theClass:Object):Boolean Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter. | Object
|  | preventDefault():void Cancels an event's default behavior if that behavior can be canceled. | Event
|  | propertyIsEnumerable(name:String):Boolean Indicates whether the specified property exists and is enumerable. | Object
|  | setPropertyIsEnumerable(name:String, isEnum:Boolean = true):void Sets the availability of a dynamic property for loop operations. | Object
|  | stopImmediatePropagation():void Prevents processing of any event listeners in the current node and any subsequent nodes in the event flow. | Event
|  | stopPropagation():void Prevents processing of any event listeners in nodes subsequent to the current node in the event flow. | Event
|  | toLocaleString():String Returns the string representation of this object, formatted according to locale-specific conventions. | Object
|  | toString():String Returns a string containing all the properties of the Event object. | Event
|  | valueOf():Object Returns the primitive value of the specified object. | Object

Public Constants
Hide Inherited Public Constants
Show Inherited Public Constants

| Constant | Defined By
--- | --- | ---
|  | DIRECTORY_LISTING : String = "directoryListing" [static] The FileListEvent.DIRECTORY_LISTING constant defines the value of the type property of the event object for a directoryListing event. | FileListEvent
|  | SELECT_MULTIPLE : String = "selectMultiple" [static] The FileListEvent.SELECT_MULTIPLE constant defines the value of the type property of the event object for a selectMultiple event. | FileListEvent

Property Detail

### files

property

`public var files:Array`

Runtime Versions: | AIR 1.0

An array of File objects representing the files and directories found or selected.

For the `File.getDirectoryListingAsync()` method, this is the list of files and directories found at the root level of the directory represented by the File object that called the method. For the `File.browseForOpenMultiple()` method, this is the list of files selected by the user.

Constructor Detail

### FileListEvent

()
Constructor

`public function FileListEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, files:Array = null)`

Runtime Versions: | AIR 1.0

The constructor function for a FileListEvent object.

The runtime uses this class to create FileListEvent objects. You will not use this constructor directly in your code.

Parameters

| `type:String` — The type of the event.
| `bubbles:Boolean` (default = `false`)`` — Determines whether the event object bubbles (`false` for a FileListEvent object).
| `cancelable:Boolean` (default = `false`)`` — Determines whether the Event object can be canceled (`false` for a FileListEvent object).
| `files:Array` (default = `null`)`` — An array of File objects.

Constant Detail

### DIRECTORY_LISTING

Constant

`public static const DIRECTORY_LISTING:String = "directoryListing"`

Runtime Versions: | AIR 1.0

The `FileListEvent.DIRECTORY_LISTING` constant defines the value of the `type` property of the event object for a `directoryListing` event.

This event has the following properties:

Property | Value
--- | ---
`bubbles` | `false`
`cancelable` | `false`; there is no default behavior to cancel.
`files` | An array of File objects representing the files and directories found.
`target` | The FileListEvent object.

### SELECT_MULTIPLE

Constant

`public static const SELECT_MULTIPLE:String = "selectMultiple"`

Runtime Versions: | AIR 1.0

The `FileListEvent.SELECT_MULTIPLE` constant defines the value of the `type` property of the event object for a `selectMultiple` event.

Property | Value
--- | ---
`bubbles` | `false`
`cancelable` | `false`; there is no default behavior to cancel.
`files` | An array of File objects representing the files selected.
`target` | The FileListEvent object.

© 2015 Adobe Systems Incorporated. All rights reserved.
Mon Apr 10 2017, 12:28 PM -07:00