FileReference (flash.net.FileReference)
565
See also
browse (FileReference.browse method)
creator (FileReference.creator property)
public creator : String [read-only]
The Macintosh creator type of the file. In Windows, this property is
null
. If the
FileReference object has not been populated, a call to get the value of this property returns
null
.
Availability:
ActionScript 1.0; Flash Player 8
Example
The following example retrieves the Macintosh creator type of a file selected by the user.
import flash.net.FileReference;
var listener:Object = new Object();
listener.onSelect = function(file:FileReference):Void {
trace("creator: " + file.creator);
}
var fileRef:FileReference = new FileReference();
fileRef.addListener(listener);
fileRef.browse();
See also
browse (FileReference.browse method)
download (FileReference.download method)
public download(url:String, [defaultFileName:String]) : Boolean
Displays a dialog box in which the user can download a file from a remote server. Flash Player
can download files of up to 100 MB.
This method first opens an operating-system dialog box that asks the user to enter a filename
and select a location on the local computer to save the file. When the user selects a location
and confirms the download operation (for example, by clicking Save), the download from the
remote server begins. Listeners receive events to indicate the progress, success, or failure of the
download. To ascertain the status of the dialog box and the download operation after calling
download()
, your ActionScript code must listen for events by using event listeners such as
onCancel
,
onOpen
,
onProgress
, and
onComplete
.
Содержание FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
Страница 1: ...ActionScript 2 0 Language Reference ...
Страница 1352: ...1352 ActionScript classes ...