I want to use XMLSocekt between localhost and example.com.
SWF in localhost try to connect example.com, SecurityError occured.
How can I use XMLSocekt between localhost and example.com?
I want to use XMLSocekt between localhost and example.com.
SWF in localhost try to connect example.com, SecurityError occured.
How can I use XMLSocekt between localhost and example.com?
You are accessing a example.com domain from localhost domain. This is called crossdomain communication.
Remote server (in this case example.com) needs to respond with crossdomain.xml allowing Flash running from localhost domain to connect.
When Flash tries to load crossdomain from XMLSocket, it sends <policy-file-request/>
to the server. Server should then respond with crossodomain.xml
This crossdomain allows every remote comunication:
<?xml version="1.0"?>
<cross-domain-policy>
<allow-access-from domain="*" to-ports="*"/>
</cross-domain-policy>