onCancel (FileReference.onCancel event listener)

onCancel = function(fileRef:FileReference) {}

Invoked when the user dismisses the file-browsing dialog box. This dialog box is displayed when you call FileReference.browse(), FileReferenceList.browse(), or FileReference.download().

Availability: ActionScript 1.0; Flash Player 8

Parameters

fileRef:FileReference - The FileReference object that initiated the operation.

Example

The following example traces a message if the user dismisses the file-browsing dialog box. This method is triggered only if the user clicks Cancel or presses the Escape key after the dialog box is displayed.

import flash.net.FileReference;

var listener:Object = new Object();

listener.onCancel = function(file:FileReference):Void {
    trace("onCancel");
}

var fileRef:FileReference = new FileReference();
fileRef.addListener(listener);
var url:String = "http://www.adobe.com/platform/whitepapers/platform_overview.pdf";
if(!fileRef.download(url, "FlashPlatform.pdf")) {
    trace("dialog box failed to open.");
}

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