/** * This file generated by AMFPHP 1.0 * You can get AMFPHP to generate code customized to your preferences * By modifying the /browser/templates/as2.tpl file */ import mx.remoting.*; import mx.rpc.*; import mx.utils.Delegate; import mx.remoting.debug.NetDebug; class LimerickService { //Change the gateway URL as needed private var gatewayUrl:String = "http://www.rightactionscript.com/states/flashremoting/gateway.php"; private var service:Service; function LimerickService() { NetDebug.initialize(); this.service = new Service(this.gatewayUrl, null, "LimerickService"); } //get a limerick by index function getLimerick(index, html) { var pc:PendingCall = service.getLimerick(index, html); pc.responder = new RelayResponder(this, "handleGetLimerick", "handleRemotingError"); } //get a limerick indices function getIds() { var pc:PendingCall = service.getIds(); pc.responder = new RelayResponder(this, "handleGetIds", "handleRemotingError"); } function handleGetLimerick(re:ResultEvent) { //Implement custom callback code } function handleGetIds(re:ResultEvent) { //Implement custom callback code } function handleRemotingError( fault:FaultEvent ):Void { NetDebug.trace({level:"None", message:"Error: " + fault.fault.faultstring }); } }