Kashif,

Let's assume you need to invoke method foo() on a destination "XYZ".
First, make sure your destination is defined in remoting-config.xml.
Then the AS code could look as the following:

var ro:RemoteObject = new RemoteObject();
// set the destination for the remote object
ro.destination = "XYZ";
// add callbacks - a generic one for faults
// specific one for the method you will be invoking
ro.addEventListener( "fault", onFault );
ro.foo.addEventListener( "result", onResult );
// now invoke your method
ro.foo();


cheers,
Mark


--- In [email protected], "Kashif Noorani" <[EMAIL PROTECTED]> wrote:
>
> Does anyone know of a way to create/use a RemoteObject programmatically
> rather than declaratively?
> 
> I want to be able to do something such as:
> 
> var ro : RemoteObject = new RemoteObject(...);
> ro.invoke(...)
>







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to