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. For file download, this event listener is invoked when Flash Player has downloaded the entire file to disk. For file upload, this event listener is invoked after the Flash Player has received an HTTP status code of 200 from the server receiving the transmission.

Availability: ActionScript 1.0; Flash Player 8

Parameters

fileRef: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.adobe.com/platform/whitepapers/platform_overview.pdf";
fileRef.download(url, "FlashPlatform.pdf");

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/00001667.html