I am using actionscript to connect to my socket server, but I always got <policy-file-request/>
sent from actionscript and after that the conneciton is closed. The code in actionscript is:
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);
}
The content of crossdomain.xml:
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="*" />
</cross-domain-policy>
The swf and it's wrapper html are all put under http://192.168.0.198/bin-debug/, and the crossdomain.xml file is loaded by actionscript successfully(thru packet capture tool).
I think supposely I shouldn't get <policy-file-request/>
if I provided the crossdomain.xml? Thanks in advance!