1 person found this helpful
My understanding is that you don't need any of that because you are loading
the root crossdomain.xml. The Player should request that file for you. Use
a network monitor to verify. But that will only work if you are later
requesting data from http://0.0.0.0/ and not some friendly DNS version of
What if I am on a shared server through my web hosting company?
Where should I put the cross-domain.xml file in that case, and will my Flex apps need to load it using any of the above?
Okay, I found that when I put the crossdomain.xml file at the root of my web site file area my hosting company provides, I do not specifically need to load the crossdomain.xml file.
But if I want finer control over who has access to what, and I put the crossdomain.xml file in the same directory as my Flex app SWF file, what lines of the following code (or additional lines I don't know about) should I put in my app creationComplete handler function to load the crossdomain.xml file?
Note, of course the IP address in my code is not 0.0.0.0.
Do I need all these lines, and am I doing this correctly?
var request:URLRequest = new URLRequest("http://0.0.0.0/myAppFolder/crossdomain.xml");
var loader:URLLoader = new URLLoader();
You should only need loadPolicyFile, and you have to call it before you
request data from that domain. CreationComplete might be too late depending
on how your server requests are set up.