1
votes

Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation:

How do I do handle this?

1
Can you show the offending code and what it is doing? The best way to handle security sandbox violations is not to commit them; to update your crossdomain.xml file if applicable. But it really depends on what you are doing that is causing the error - Ryan Guill

1 Answers

2
votes

This seemed to work. Thanks anyways.

import flash.events.SecurityErrorEvent;

loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, SecurityErrorEventExample);

function SecurityErrorEventExample() {
    var loader: URLLoader = new URLLoader();
    loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
    var request: URLRequest = new URLRequest("http://www.perdanadesigns.com");
    loader.load(request);
}

function securityErrorHandler(event: SecurityErrorEvent): void {
    trace("securityErrorHandler: " + event);
}