Reputation: 907
I made my flash FTP transfer using socket , but when putting it in HTML file i am getting cross domain error, i have tried with various possibilities but failed. Please help me if anybody know how to how to do socket policy in flash as3.
My file is placed at root of my ipaddress and I have tried with following options
1) Security.loadPolicyFile('xmlsocket://ipaddress:80/crossdomain.xml')
;
with 80 port
2) Security.loadPolicyFile('xmlsocket://ipaddress/crossdomain.xml');
without mentioning any point
3) Security.loadPolicyFile('xmlsocket://ipaddress:diffport/crossdomain.xml');
trying with different port
Upvotes: 0
Views: 1839
Reputation: 759
Socket policy files are served differently than crossdomain policy files for HTTP requests. You need a socket policy server, not just a socket policy file placed on an HTTP server. See http://www.adobe.com/devnet/flashplayer/articles/socket_policy_files.html
Upvotes: 0
Reputation: 104
To validate a server policty with flash for a socket server, remove the file name: Security.loadPolicyFile('xmlsocket://ipaddress:port');
It assume that your server listen to the given port and will return the security policy. However the port you given (80) is the http port, so it may not be valid (used for the http requests)
Upvotes: 1