Skip to content Skip to sidebar Skip to footer

As3 Air For Android - Application-sandbox Content Error

THE GOAL: I am trying to allow externally loaded swf files communicate with each other that are locally loaded from the device. I need to be able to have access to vars and functio

Solution 1:

If you put a try catch around that line it won't throw an error if it fails. And this way when your code will work on the web and as an app. (apps don't need to allowDomain b/c they can download everything by default and that is why it fails.)

try {Security.allowDomain("*");}catch (e) { };

Solution 2:

From my experience you can load remote swfs from another domain that is configured correctly with the crossdomain xml. something like: https://developers.arcgis.com/flex/guide/using-crossdomain-xml.htm

You can load swf with code, but if you try to access the stage for example it will fail.

Also, if in your original project (hosted all on a web server, you used common static variables or singeltons, it will not succeed. My solution was adding functions on those files which receive the objects I needed to work with.

Solution 3:

As far as I know you can't execute code from loaded swfs in AIR, you can still use multiple swfs to dislay assets but any code will give that error.

Post a Comment for "As3 Air For Android - Application-sandbox Content Error"