0 Replies Latest reply on Apr 29, 2007 1:46 PM by SkiShakakai

    Syntax Errors

    SkiShakakai
      I'm getting a bunch of vague syntax errors in Flex builder with this code. I haven't done alot of OOP in ActionScript, mostly procedural stuff using MXML Components, so I might be missing something. Can anyone point me in the right direction? I'm trying to authenticate a user against Google's Client Login API. Thanks for the help.

      package dataConnector.google {

      import mx.rpc.http.HTTPService;

      public class Auth extends HTTPService {

      private var _authToken : String = new String();
      private var _authObj : Object = new Object();

      public function Auth(username:String, password:String):void{
      //Setup Google Object
      super(null);
      this.url = "https://www.google.com/accounts/ClientLogin";
      this.method = 'POST';
      //this.userProxy = false;

      //Create Parameter Object for HTTP POST
      _authObj.password = password;

      if(username.indexOf("@gmail.com") == -1){
      _authObj.username = username + "@gmail.com";
      }
      else{
      _authObj.username = username;
      }
      }

      public function submit():void{

      this.send(_authObj);
      }
      }
      }