Monday, October 18, 2010

Flash, Web Services and Cross-domain restrictions

I am working on a game community portal called Jippii. This is the link to the Spanish version http://www.jippii.es/. There you can play flash skill games and earn actual prizes, like phones or movie tickets. Although, I haven't finished the development yet.  Just a  few more weeks  and you will be able to give it a try.

Today I wasted several hours in forum pages looking for the answer to a problem I had. Every day I am getting more and more used to immediately google my programming problems. On this occasion, I was having troubles with the communication of the flash game with the web services that handles the trials and the score records.
In a nutshell, the flash game is hosted on a different server than the web services, so of course, I needed a crossdomain file.  The problem was to make a correct one.  Let's back to the wasting hours part, I started to google and found many people having the same problem. This made me think that I would find the solution to mine soon enough by just reading the forums. I was wrong. None of the entries I found solved my problem. And then, suddenly I remembered RTFM (thanks to my friends JG and DO for teaching me that) and the enlightenment came to me.

In the Cross-domain policy file specification page 15, example 1.9:

<cross-domain-policy>
<allow-http-request-headers-from domain="*" headers="SOAPAction"/>
</cross-domain-policy>

Problem solved.  From now on, I will try googling a little bit less and RTFM instead.