mike chambers | about

Flash Remoting : Passing responder object with remote function calls.

Tuesday, July 9, 2002

Branden Hall and Christian Cantrell are on the same DC - NYC train that I am. Branden showed me some useful Flash Remoting stuff he figured out.

You can pass a responder object for a remote method as the first argument to the method call. This allows you to pass a separate instance of an object when you are calling the same remote method multiple times. The only caveat is that the responder function must have an onResult method. It will not work if your use functionName_Result. Here is an example:

var result = new Object();
result.onResult = function(data)

{
	trace("data received");
}

 //netservices code snipped
 service.functionName(result, "foo");
twitter github flickr behance