2 Replies Latest reply on Feb 2, 2011 12:12 PM by Chris McLaughlin

    Difficulty replicating simple HTML POST in AS3

    Chris McLaughlin Level 1



      I'm trying to post a username and password to a server side script.  The client provided an HTML form that demonstrates that the sever side functionality is working, but I keep getting the following:


      Invalid UserName / Password Combination



      Here's the HTML code:


      Here's what I have been doing in AS3:



      var loader:URLLoader = new URLLoader();
      var header:URLRequestHeader = new URLRequestHeader("pragma", "no-cache");
      var request:URLRequest = new URLRequest("http://sitename.net/login");
      request.data = new URLVariables();
      request.data.username = "username";
      request.data.password = "password";
      request.method = URLRequestMethod.POST;
      try {
       } catch (error:Error) {
       trace("Unable to load requested document.");


      Any insight would be appreciated.


      Best regards,



      Chris McLaughlin