You'll have to use Responder.

Something like this:
responder:Responder = new Responder(onResult, onError);
connection.call("serverMethod", responder, ...params);

public function onError(errorObj:Object):void {
        // errors are handled here
}

public function onResult(resultObj:Object):void {
        // results are handled here
}

Regards, Hannu

Jason Mellen kirjoitti:
> Hi there,
> 
> I am rather new to working with Red5 and I'm trying to figure out how  
> to call server methods. I've reviewed the tutorials and API but can't  
> get it working quite yet. Maybe someone could see if I am doing  
> things properly.
> 
> Client code:
>   nc = new NetConnection();
>      nc.connect("rtmp://localhost/campfire/lkj");
> ....
> on (release) {
>        trace ("calling start");
>        var resultObj = {};
> resultObj.onResult = function(info){
> trace(info);
> }
>        nc.call("presentation.recordStart", resultObj);
> /* I also tried the .call formal in the Red5 references with no luck  
> either. This is how the
> adobe books say to do it. */
>       
> }
> 
> Server code:
> Application.java -
> 
>    Object handler = new campfire.CFpresentationHandler(app);
>    app.registerServiceHandler("presentationrecordStart", handler);
> 
> CFpresentationHandler.java -
> 
> public CFpresentationHandler(IScope app) {
>               super();
>               ...
>       }
> 
> public void recordStart() {
> ...
> }
> 
> Thanks for any ideas on this. Hopefully as I get used to how this  
> stuff works I can start adding to the documentation as well.
> 
> Jason
> 
> 
> Jason Mellen
> Digital Media Research Group
> College of Technology
> Bowling Green State University
> 
> 419.372.7493
> 
> 
> 
> 
> 
> _______________________________________________
> Red5 mailing list
> [email protected]
> http://osflash.org/mailman/listinfo/red5_osflash.org
> 

_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org

Reply via email to