3 Replies Latest reply on Sep 14, 2012 7:56 AM by 4xyfenix

    URLLoader fails to load local swf file with the 2032 security error

    4xyfenix Level 1

      Hello,

       

      I have an air application for mobile android device.

       

      It communicates with the BlazeDS server and loads different resources from the server.

      I use URLLoader and URLRequest to load resources. Everything is loaded perfectly.

       

      THE PROBLEM is that when I try to load same resources from the local storage.

       

      So, I replaced the storage url to something like this: "file:////mnt/sdcard/Temp/games/" on Android device and

      "file:///D:\web_servers\tomcat\webapps\games\" when run on Windows developer's machine under the simulator.

      All the files (.xml, .png and resource containing swfs) are loaded EXCEPT the only one:

      main.swf containg ActionScript application code. Attempt to load it causes the error:

       

      *** Security Sandbox Violation ***

      Connection to file:///D:\web_servers\tomcat\webapps\games\classic/space_attack/../../_common/main.swf halted - not permitted from app:/catalog_mobile.swf

      [GameResourceLoader]: Loading failed: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: file:///D:\web_servers\tomcat\webapps\games\classic/space_attack/../../_common/main.swf" errorID=2032]

       

      In manuals http://help.adobe.com/ru_RU/FlashPlatform/reference/actionscript/3/flash/net/URLRequest.ht ml sayed that is possible to use 'file:///' scheme.

       

      What should I perform to make air to allow to load the content I needed? How to make loaded content to be trusted?

       

      I have those permissions in the application.xml allowed (but it doesn't matter):

       

      <uses-permission android:name="android.permission.INTERNET"/>

      <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>

       

      Any help is really appreciated.

      Thanx in advance.