3 Replies Latest reply on May 30, 2009 8:15 PM by kglad

    *** Security Sandbox Violation ***


      This is very interesting, the xmlLoader.load ( new URLRequest( backend + "?" + new Date().valueOf() ) ) call is working fine once I did as kglad said and added the path of the flash flies to the settings.


      But, later in the code where I try to load the images from the same server, there is a security sandbox violation:


      *** Security Sandbox Violation ***

      SecurityDomain 'http://localhost:8042/img/PhotoParata-002.JPG' tried to access incompatible context


      Here is the code that is causing the security sandbox violation:


      imageLoader.load (new URLRequest("http://localhost:8042/img/PhotoParata-002.JPG"));


      Ideally I would like to know how to setup things so that the Flash environment so it considers http://localhost:8042 to be where the Flash file originates so that these security violations go away, my question in this thread:  http://forums.adobe.com/thread/440319



        • 1. Re: *** Security Sandbox Violation ***
          kglad Adobe Community Professional & MVP

          if you're testing and your flash files are also on localhost, go to the flash security settings panel and add the folder that contains your flash files.


          if you're doing anything else,  like deploying your flash files on a server that will load images or anything else from your computer, explain.

          • 2. Re: *** Security Sandbox Violation ***
            ehcarleton Level 1



            I have to disagree with you.  There is generally a more fundamental issue in play here.  The actual implementation of my solution will be as follows:


            One Apache web server that hosts three things:


            1. The Flash RIA
            2. Custom Apache Modules to serve up the images
            3. Web Services to provide all the other interaction between the Flash RIA and the backend database.


            If I follow your advice, all my Flash code is going to have to have http://localhost:8042/ hard coded where ever the custom module is access or the Web Services are accessed.


            In the world in which I am accustom to, there are ways to launch the web server and "attach" to the code I am interested in debugging.  I am assuming there is a way to do that with Flash, or at least I am hoping... 


            This paradigm of a Flash RIA needing to interact with Web Services and needing to debug the Flash RIA is a very standard concept, so there must be some solution.  If not, maybe I will need to use a JavaScript Framework.  My main concern is that there is something to debug when the server is a Flash media server, but not a generic server as in my situation.



            • 3. Re: *** Security Sandbox Violation ***
              kglad Adobe Community Professional & MVP

              click file/publish settings/flash/local playback security/access network only.