title: URLRequest not working in Cross domain in As3?
body: <p>URLRequest not working in Cross domain in AS3?</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  
  &lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" applicationComplete="init()"&gt;
      &lt;mx:Button x="35" y="22" label="Button" click="test()"/&gt;
      &lt;mx:TextArea x="35" y="65" width="365" height="254" id="aaa"/&gt;
      &lt;mx:Script&gt;
          &lt;![CDATA[
  
              function init():void {
        Security.allowDomain("*");  // localhost, 192.168.0.19
      Security.loadPolicyFile("http://abcomp01.thaifasthost.com/crossdomain.xml"); 
     }
  
              function test():void {
              var url:String = "http://bbs.pramool.com/webboard/view.php3?katoo=j530492";
              var request:URLRequest = new URLRequest(url);
              var loader : URLLoader = new URLLoader();
              request.url = url;
  
              request.method = URLRequestMethod.POST;
              loader.addEventListener(Event.COMPLETE, on_complete);
              loader.addEventListener(IOErrorEvent.IO_ERROR, on_error);       
              //navigateToURL(request);
                          try {
                  loader.load(request);
              } 
              catch (error:Error) {
              }
  
              }
  
  
              function on_complete(e : Event):void{
              var loader:URLLoader = e.target as URLLoader;
              if (loader != null)
              {
                  aaa.text = loader.data;
              }
          }
          function on_error(e : Event):void{
          }   
          ]]&gt;
      &lt;/mx:Script&gt;
  &lt;/mx:Application&gt;
  </code></pre>
  
  <p>In XML cross domain:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd"&gt;
  &lt;cross-domain-policy&gt;
      &lt;allow-access-from domain="*" to-ports="*" /&gt;
  &lt;/cross-domain-policy&gt;
  </code></pre>
  
  <p>How can I fix this?</p>
  
  <p>It works when I upload to my own hosting but not when on my local machine.</p>