PDA

View Full Version : Sending variables through POST in Air


Elias_Maluco
10-24-2007, 08:13 PM
Hi all. I have an apllication I was building in AS3 and I decided to port it to Air.

Well, the problem is: it connects to a php script sending some parameters through POST In the browser, this is working perfectlly. But when I compile it as an Air application, it dont. The application does connects to the php script, but the script is not receiving any of the POST parameters.

That means I cant use POST unless Im running the swf from a brownser?

panel
10-25-2007, 09:32 AM
Are you sending like this? (this works for me)


var urlVariables:URLVariables = new URLVariables();
urlVariables.score = "256";
urlVariables.name = "Igor"

var urlRequest:URLRequest = new URLRequest("http://www.actionscript.org/send.php");
urlRequest.method = URLRequestMethod.POST;
urlRequest.data = urlVariables;
sendToURL(urlRequest);