I have been trying to get connected to my MySQL db from an Air mobile AS3 app I am making with flashdevelop. I have been using this tutorial series from tutsplus+ as reference.
I have been able to get an embedded swf with local security access to connect to the db using my login username and password as they do in the tutorial.
I spent 4 hours last night trying to find out why my air app doesn't connect when I use it from my android phone or tablet. When I try to connect using the URLLoader I get
IO Error #2032.
I thought the URL needed to be the full web address. I guess I am unclear whether there needs to be something special done to get access to a php processing page on my server. I thought under the application sandbox you had that ability. Am I missing something? I have tested my php handling page, and it works from the embedded swf or if I just comment out some code, so I know it is connecting, retrieving a record and printing a result, but for some reason my Air Mobile as3 code isn't doing the trick to make it work.
Here is the main connection function I am trying to get work:
public function processLogin ():void {
result.text = "processing Login";
var phpVars:URLVariables = new URLVariables();
var phpFileRequest:URLRequest = new URLRequest("http://www.websiteaddress/php/ControlPanel.php");
result.text = phpFileRequest.url;
trace(phpFileRequest.url);
phpFileRequest.method = URLRequestMethod.POST;
phpFileRequest.data = phpVars;
var phpLoader:URLLoader = new URLLoader();
phpLoader.dataFormat = URLLoaderDataFormat.VARIABLES;
phpLoader.addEventListener(Event.COMPLETE, showResult);
phpLoader.addEventListener(IOErrorEvent.IO_ERROR, onError);
phpLoader.addEventListener(HTTPStatusEvent.HTTP_RESPONSE_STATUS, httpHandleError);
phpVars.systemCall = "checkLogin";
phpVars.username = username.text;
phpVars.password = password.text;
phpLoader.load(phpFileRequest);
}