User Guide
590 ActionScript classes
textTypes.extension = "*.txt; *.rtf";
allTypes.push(textTypes);
var fileRef:FileReferenceList = new FileReferenceList();
fileRef.browse(allTypes);
See also
browse (FileReference.browse method), FileReference
(flash.net.FileReference)
fileList (FileReferenceList.fileList property)
public fileList : Array
An array of FileReference objects.
When the
FileReferenceList.browse() method has been called and the user has selected
one or more files from the dialog box opened by
browse(), this property is populated with an
array of FileReference objects, each of which represents a file the user selected. You can then
use this array to upload the files with
FileReference.upload(). You must upload one file at
a time.
The
fileList property is populated anew each time browse() is called on that
FileReferenceList object.
The properties of FileReference objects are described in the FileReference class
documentation.
Availability: ActionScript 1.0; Flash Player 8
Example
The following example demonstrates the
fileList property.
import flash.net.FileReferenceList;
import flash.net.FileReference;
var listener:Object = new Object();
listener.onSelect = function(fileRefList:FileReferenceList) {
trace("onSelect");
var list:Array = fileRefList.fileList;
var item:FileReference;
for(var i:Number = 0; i < list.length; i++) {
item = list[i];
trace("name: " + item.name);
}
}