0 Replies Latest reply on Nov 13, 2009 3:38 PM by squadjot

    Sandbox madness!

    squadjot

      Hi all

       

      I'm wondering why im getting sandbox error messages when i load SWF from the flash author. especially when the script does exactly what i exspect..

      it works!..so why do i get these error messages then?

       

      Second, but most important question, is there a way do filter/disable these sandbox error messages?

       

      swf_A.swf

      System.security.allowDomain("*");
      this.obj1 = {}
      this.createEmptyMovieClip("lmc",1)
      loadMovie("http://mydomain.com/swf_B.swf",lmc)
      

       

      mydomain.com/swf_B.swf

      System.security.allowDomain("*");
      _root.obj1.str = "Hello World"
      trace("write to object in root " + _root.obj1.str)
      _root.objExt1 = {}; 
      trace("create a object in root " + _root.objExt1)
      

       

      Output window

      *** Security Sandbox Violation ***
      SecurityDomain 'http://mydomain.com/swf_B.swf' tried to access incompatible context 'file:///C|/swf_A.swf'
      write to object in root Hello World
      *** Security Sandbox Violation ***
      SecurityDomain 'http://mydomain.com/swf_B.swf' tried to access incompatible context 'file:///C|/swf_A.swf'
      create a object in root [object Object]
      

       

      So..above script does exactly what expected.. but.. i get error messages.?