3 Replies Latest reply on Aug 16, 2007 7:25 AM by ntsiii

    Can't get security policies to work

    saliksyed Level 1
      I tried putting both of these lines into my flex files onload function:

      Security.allowDomain("*");
      Security.loadPolicyFile("crossdomain.xml")

      The crossdomain.xml is in the same folder as my flash file. It has the following content:
      <?xml version="1.0"?>
      <cross-domain-policy>
      <allow-access-from domain="XX.XX.22.140" to-ports="*" />
      <allow-access-from domain="*" to-ports="*" />
      </cross-domain-policy>

      When I do this
      var reqURL:String=' http://XX.XX.22.140/livedata.php?motesensors='
      var myrequest:URLRequest = new URLRequest(reqURL);
      I get a security policy error! what is the problem here?