Flash CS3 Documentation |
|||
| ActionScript 2.0 Language Reference > ActionScript classes > FileReference (flash.net.FileReference) > name (FileReference.name property) | |||
public name : String [read-only]
The name of the file on the local disk. If the FileReference object has not been populated, a call to get the value of this property returns null.
All the properties of a FileReference object are populated by calling browse(). Unlike other FileReference properties, if you call download(), the name property is populated when onSelect is invoked.
Availability: ActionScript 1.0; Flash Player 8
The following example retrieves the name of a file selected by the user.
import flash.net.FileReference;
var listener:Object = new Object();
listener.onSelect = function(file:FileReference):Void {
trace("name: " + file.name);
}
var fileRef:FileReference = new FileReference();
fileRef.addListener(listener);
fileRef.browse();
browse (FileReference.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/00001665.html