samedi 16 février 2008

Flex: how-to access remote data (xml) through a proxy?

Flash player (used by Flex) has a very strict security policy: it's not possible to access public data from another domain than the one where your swf stands (unless a crossdomain.xml file is present on the distant server you want to access).

If the crossdomain file doesn't exist it is always possible to copy a minimal proxy file on your server (where your swf is present). This way flash player will communicate locally with the proxy, the proxy will give the result back to flashplayer, and there won't be any remote domain seen by flashplayer.

How-to use a proxy with Flex and Action Script3? (code and example)

Aucun commentaire: