FileReference (flash.net.FileReference)
571
onComplete (FileReference.onComplete event
listener)
onComplete = function(fileRef:FileReference) {}
Invoked when the upload or download operation has successfully completed. Successful
completion means that the entire file has been uploaded or downloaded.
Availability:
ActionScript 1.0; Flash Player 8
Parameters
fileRef
:flash.net.FileReference
- The FileReference object that initiated the operation.
Example
The following example traces out a message when the
onComplete
event is triggered.
import flash.net.FileReference;
var listener:Object = new Object();
listener.onComplete = function(file:FileReference):Void {
trace("onComplete: " + file.name);
}
var fileRef:FileReference = new FileReference();
fileRef.addListener(listener);
var url:String = "http://www.macromedia.com/platform/whitepapers/
platform_overview.pdf";
fileRef.download(url, "FlashPlatform.pdf");
onHTTPError (FileReference.onHTTPError event
listener)
onHTTPError = function(fileRef:FileReference, httpError:Number) {}
Invoked when an upload fails because of an HTTP error.
Because of the way that Flash Player relies on the browser stack during file download, this
error is not applicable for download failures. If a download fails because of an HTTP error,
the error is reported as an I/O error.
Availability:
ActionScript 1.0; Flash Player 8
Summary of Contents for FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
Page 1: ...ActionScript 2 0 Language Reference ...
Page 1352: ...1352 ActionScript classes ...