Table of Contents

AS3 Lightweight Remoting Framework

This project is motivated by the need for a simple yet robust framework for handling remoting calls. This framework could be used in AS3-only projects without the Flex framework, or it could be used in a Flex project to access remoting resources that aren’t supported by the Flex framework.

You can also access this project from thethe RIAForge project page. There you can use the forums and post defects. http://as3lrf.riaforge.org.

Download

You can download the latest SWC and source from the following SVN repository: http://svn1.cvsdude.com/osflash/as3lrf

Sample Usage

package {
	
	import com.dannypatterson.remoting.FaultEvent;
	import com.dannypatterson.remoting.ResultEvent;
	import com.dannypatterson.remoting.ServiceProxy;
	import flash.display.Sprite;
	
	public class RemotingExample extends Sprite {
		
		private var serviceProxy:ServiceProxy;
		
		public function RemotingExample() {
			serviceProxy = new ServiceProxy("http://www.dannypatterson.com/flashservices/gateway", "com.dannypatterson.blog.Blog");
			serviceProxy.addEventListener(ResultEvent.RESULT, onResult, false, 0, true);
			serviceProxy.addEventListener(FaultEvent.FAULT, onFault, false, 0, true);
			serviceProxy.addEventListener(FaultEvent.CONNECTION_ERROR, onConnectionError, false, 0, true);
			serviceProxy.getEntries(0, new Date(2006, 5));
			serviceProxy.getEntries(0, new Date(2006, 6));
		}
		
		private function onConnectionError(event:FaultEvent):void {
			trace("onConnectionError: " + event.fault);
		}
		
		private function onFault(event:FaultEvent):void {
			trace("onFault: " + event.fault);
		}
		
		private function onResult(event:ResultEvent):void {
			trace("onResult: " + event.result);
		}
		
	}
	
}

Forums

http://as3lrf.riaforge.org/index.cfm?event=page.forums

Bug Tracking

http://as3lrf.riaforge.org/index.cfm?event=page.issues

Credits