Flash CS3 Documentation |
|||
| ActionScript 2.0 Language Reference > ActionScript classes > FileReferenceList (flash.net.FileReferenceList) > onSelect (FileReferenceList.onSelect event listener) | |||
onSelect = function(fileRefList:FileReferenceList) {}
Invoked when the user selects one or more files to upload from the file-browsing dialog box. (This dialog box is displayed when you call the FileReferenceList.browse(), FileReference.browse(), or FileReference.download() methods.) When the user selects a file and confirms the operation (for example, by clicking Save), the FileReferenceList object is populated with FileReference objects that represent the files selected by the user.
Availability: ActionScript 1.0; Flash Player 8
fileRefList:FileReferenceList - The FileReferenceList object that initiated the operation.
The following example demonstrates the onSelect listener.
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);
trace(item.addListener(this));
item.upload("http://www.yourdomain.com/");
}
}
listener.onComplete = function(file:FileReference):Void {
trace("onComplete: " + file.name);
}
var fileRef:FileReferenceList = new FileReferenceList();
fileRef.addListener(listener);
fileRef.browse();
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/00001686.html