1 Reply Latest reply on Jul 19, 2009 11:14 PM by Madhav Subedi

    How to use HTTPSERVICE in Actionscript project.

      Hello all,
      I am doing an actionscript project, I want to use httpservice to send a data to server . Is any one knows how to use httpservice in actionscript project?

        • 1. Re: How to use HTTPSERVICE in Actionscript project.
          Madhav Subedi Level 4

          following code may help:


          import mx.rpc.http.HTTPService;

          import mx.rpc.events.FaultEvent;

          import mx.rpc.events.ResultEvent;

          private function callHTTPSERVIDE():void



          var hs:HTTPService = new HTTPService();

          hs.url = 'Server.php';

          hs.addEventListener( ResultEvent.RESULT, resultHandler );

          hs.addEventListener( FaultEvent.FAULT, faultHandler )



          private function resultHandler( event:ResultEvent ):void


          //handle your result here


          private function faultHandler( event:FaultEvent ):void


          // code for fault handling.