576
ActionScript classes
See also
onSecurityError (FileReference.onSecurityError
event listener)
onSecurityError = function(fileRef:FileReference, errorString:String) {}
Invoked when an upload or download fails because of a security error. The calling SWF file
may have tried to access a SWF file outside its domain and does not have permission to do so.
You can try to remedy this error by using a cross-domain policy file.
Availability:
ActionScript 1.0; Flash Player 8
Parameters
fileRef
:flash.net.FileReference
- The FileReference object that initiated the operation.
errorString
:String
- Describes the error that caused
onSecurityError
to be called. The
value is "securitySandboxError".
Example
The following example creates a FileReference object with a listener for each possible event,
including
onSecurityError
. The
onSecurityError
listener is triggered only if the upload
fails because of a security error.
import flash.net.FileReference;
var listener:Object = new Object();
listener.onSelect = function(file:FileReference):Void {
trace("onSelect: " + file.name);
if(!file.upload("http://www.yourdomain.com/
yourUploadHandlerScript.cfm")) {
trace("Upload dialog failed to open.");
}
}
listener.onCancel = function(file:FileReference):Void {
trace("onCancel");
}
listener.onOpen = function(file:FileReference):Void {
trace("onOpen: " + file.name);
}
listener.onProgress = function(file:FileReference, bytesLoaded:Number,
bytesTotal:Number):Void {
Summary of Contents for FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
Page 1: ...ActionScript 2 0 Language Reference ...
Page 1352: ...1352 ActionScript classes ...