User Guide
578 ActionScript classes
Parameters
fileRef:flash.net.FileReference - The FileReference object that initiated the operation.
Example
The following example traces a message within the
onSelect event listener.
import flash.net.FileReference;
var listener:Object = new Object();
listener.onSelect = function(file:FileReference):Void {
trace("onSelect: " + file.name);
if(!file.upload("http://www.yourdomain.com/
yourUploadHandlerScript.cfm")) {
trace("Upload dialog failed to open.");
}
}
var fileRef:FileReference = new FileReference();
fileRef.addListener(listener);
fileRef.browse();
removeListener (FileReference.removeListener
method)
public removeListener(listener:Object) : Boolean
Removes an object from the list of objects that receive event notification messages.
Availability: ActionScript 1.0; Flash Player 8
Parameters
listener:Object - An object that listens for a callback notification from the FileReference
event listeners.
Returns
Boolean - Returns true if the object specified in the listener parameter was successfully
removed. Otherwise, this method returns
false.