0 Replies Latest reply on May 2, 2011 4:52 PM by kmannucf

    OOP httpservice result function return


      I am trying to create a custom actionscript connection class for my flash builder project. I understand a little about creating classes but I have gotten to a point where I am stumped. I am trying to figure out how to get the data back from the result function that is called.


      Code from the class:


      public function login(pUname:String, pPword:String):void


           var findHttpService:HTTPService = new HTTPService();

           findHttpService.url = findPHP;

           findHttpService.addEventListener(ResultEvent.RESULT, loginResult);

           findHttpService.addEventListener(FaultEvent.FAULT, loginFault);




      public function loginResult(event:ResultEvent):void


           //Result goes here




      Code from main file


      var findPHP:PHPConnection = new PHPConnection();

      findPHP.login(username.text, password.text);


      From the main file, how would I get to the data that is in the loginResult function considering that it wont be returned by the login function?