topic as tree
 
 
Justin Watkins AS2 Remoting Classes
FROM: metalogic | TO: all | DATE: 10/03/2003 08:14:48PM | PERMALINKS: community / blog

Just wanted to send a public nod over to Justin Watkins, known for AMFPHP, for his ActionScript 2.0 port of the Flash Remoting classes. I finally had a chance to beat these up last night and they work flawlessly. Here's a quick example of how I'm using them:

import org.amfphp.remoting.NetServices; 

class com.westcoastlogic.RemotingService 
{ 
 private var serviceName:String; 
 private var servicePath:String; 
 private var gw:NetConnection; 
  
 function RemotingService( sn:String, sp:String ) 
 { 
 // set defaults for testing in the Flash authoring tool 
 this.serviceName = (sn == undefined) ? "Fusebox.DFB4.FlashIntegration.Services.TestService" : sn; 
 this.servicePath = (sp == undefined) ? "http://localhost/flashservices/gateway" : sp; 
  
 // open conn 
 gw = NetServices.createGatewayConnection( servicePah ); 
  
 // test the service 
 _getService().test(); 
 } 

 private function _getService():Object 
 { 
 return gw.getService( serviceName, this ); 
 } 
  
 private function test_Result( s:String ):Void 
 { 
 trace(s); 
 }; 

 private function test_Status( error:Array ):Void 
 { 
 trace( error.description ); 
 }; 
} 

Justin's port reworks RecordSet class and the RSDataProvider to use the new DataProvider model enabling bindings to the new UI components. Very nice stuff. Thank you!

Oh yeah, you can find these components and a connector component for windows here and for mac/linux users here.

REFERENCE:
thread map
metalogic
guest