1 Reply Latest reply: Apr 19, 2010 3:08 AM by Kh7 RSS

    Problem with AMFPHP

    Kh7 Community Member

      Hi,

      I try to load function from PHP using AMFPHP in Flash. But Flash returns an error:

      Error #2044: Unhandled NetStatusEvent:. level=error, code=NetConnection.Call.Failed

       

      AMFPHP works correctly and I tested my PHP service in it -- it's OK. What can cause the problem?

      Here is my code:


      import flash.net.*;
       
      var gw:NetConnection = new NetConnection();
      gw.connect("http://localhost/amfphp/gateway.php");
       
      var responder:Responder = new Responder(onResult, onFault);
       
      function onResult(respond:Object)
      { trace(respond); }
       
      function onFault(error:Object) {
           for (var i in error)
           { trace(error[i]); }
      }
      gw.call("Calc.add", responder, 2, 3); 

       

      I work on localhost.