Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

About this user

Alex Williams http://www.alexwilliams.ca

« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS 

Flash 8 AS2 REMOTING with AMFPHP

This code should be used to perform remoting with Flash 8 using ActionScript 2.

   1  
   2  // remoting
   3  import mx.remoting.Service;
   4  import mx.remoting.PendingCall;
   5  import mx.rpc.RelayResponder;
   6  import mx.remoting.debug.NetDebug;
   7  
   8  NetDebug.initialize();
   9  
  10  var myResponder:RelayResponder = new RelayResponder(this,"say_Result","say_Fault");
  11  var siteCFC:Service = new Service("http://127.0.0.1/flashservices/gateway.php",null,"HelloWorld",null,myResponder);
  12  var temp_pc:PendingCall = siteCFC.say("Hola chicos!");
  13  
  14  function say_Result(re){
  15  	trace(re.result);
  16  }
  17  function say_Fault(result){
  18  	trace("error!");
  19  }
« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS