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);
    }
}

var fileRef:FileReferenceList = new FileReferenceList();
fileRef.addListener(listener);
fileRef.browse();

See also

FileReference (flash.net.FileReference), upload (FileReference.upload method), browse (FileReferenceList.browse method)


Flash CS3


 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/9.0/main/00001683.html