EasyManua.ls Logo

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE - Onsecurityerror (Filereference.onsecurityerror Event Listener)

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
1378 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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 {

Table of Contents

Related product manuals