title: actionscript: connect to socket server
body: <p>I am using actionscript to connect to my socket server, but I always got <code>&lt;policy-file-request/&gt;</code> sent from actionscript and after that the conneciton is closed. The code in actionscript is:</p>
  
  <pre><code>            protected function connect_to_server_btn_clickHandler(event:MouseEvent):void
          {
              Security.loadPolicyFile("http://192.168.0.198/crossdomain.xml");
              socket = new Socket();
              socket.addEventListener(Event.CONNECT, onConnect);
              socket.connect("192.168.0.198", 9999);
          }
  </code></pre>
  
  <p>The content of crossdomain.xml:</p>
  
  <pre><code>&lt;?xml version="1.0"?&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="*" /&gt;
  &lt;/cross-domain-policy&gt;
  </code></pre>
  
  <p>The swf and it's wrapper html are all put under <a href="http://192.168.0.198/bin-debug/" rel="nofollow noreferrer">http://192.168.0.198/bin-debug/</a>, and the crossdomain.xml file is loaded by actionscript successfully(thru packet capture tool).</p>
  
  <p>I think supposely I shouldn't get <code>&lt;policy-file-request/&gt;</code> if I provided the crossdomain.xml? Thanks in advance!</p>