Runtime Error 2048

This is one that has nailed me a couple of times. It is a Sandbox Security violation error which means that one of your SWF’s tried to access a file from a different url – which is a big no-no in flash.I ran into this one when accessing a database script for a recent project. The strange part was that all the files were on the same server. When I took a look at the error generated

Security sandbox violation: cannot load data from

At first glance it looks like they are the same url. But on closer look, you’ll notice that the www is missing from the first url and that is the culprit. Seems the Flash Player sees that as a distinct url and therefore does not allow access to the other one from it.

The Fix

The easiest way to fix this error was to create a CrossDomain.xml policy file that tells flash what domains are allowed. They look like this:

<?xml version=”1.0″?><!DOCTYPE cross-domain-policySYSTEM “”>
<allow-access-from domain=”” />
<allow-access-from domain=”” />

Save the file as crossdomain.xml and drop into the root folder of your server and that should solve the problem. You can read more about Cross Domain Policy files here

Leave a Reply