R – FlashLite 2.x/3.0 Cross Domain policy file

actionscriptflashflashlitepolicysockets

As per my understanding of the Adobe docs for a cross domain request by an swf, two types of policy files are required on the server:

  1. URL policy file: this is named "crossdomain.xml" and stored in the root of the server and is generally an http request to the server.
    System.security.loadPolicyFile("http://foo.com/crossdomain.xml");

  2. Socket policy file: this is requested via xmlsocket protocol and on port 843 using say System.security.loadPolicyFile("xmlsocket://foo.com:843");

The question is if my FLashLite client is only going to be talking to the server using Sockets(via xmlSocket) do I still need to ask for crossdomain.xml over http, or can I skip step 1 and directly ask for the socket policy file at step 2?

Best Answer

If your FlashLite client resides in the same domain, you don't need an http crossdomain.xml file even if you are going to communicate with the server through http - crossdomain.xml is needed for cross-domain accesses, not for same domain accesses.

xmlsocket policy files are required no matter where your swf resides - that's different.

Related Topic