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

Actionscript 2.0 language reference
Table of Contents

Advertisement

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
errorString:String
value is "securitySandboxError".
Example
The following example creates a FileReference object with a listener for each possible event,
including
onSecurityError
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 {
576
ActionScript classes
- The FileReference object that initiated the operation.
- Describes the error that caused
. The
onSecurityError
onSecurityError
listener is triggered only if the upload
to be called. The

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF