Security Policies in Flash Player 9

I recently had a problem with Security Policies with flash player; I suggest you to read the official documentation specially if you want to know what to do in several versions of Flash Player.

WhatI learn is too simple about loading a crossdomain.xml from a server:

  1. If you load the crossdomain.xml from an http request. Example: Security.loadPolicyFile(''). The flash player sandbox will only allow to you swf to connect to ports over 1024
  2. If you want to load ports below this, you need to read the crossdomain from a port below 1024, for example: Security.loadPolicyFile('xmlsocket://')

Of course the most important about the last is that you can load from any port below 1024 and you’re granted to access any port on that server; you can use classes like Socket or XMLSocket for connecting to other ports; so you can have a server listening to information from Flash, but in another to serve the policies. You can do for example a small server in PHP5 for example: which shows you to use this great feature in PHP5.

Hope this help you.