[Red5] red5-web.xml question

Andrew Sinning andrew at learningware.com
Fri Oct 16 19:06:08 PDT 2009


The problem is that when flash sends the parameters, they are ALL put 
into an array.  I fixed problem by removing the first parameter from my 
server function so now the complete function is:

public boolean invokeOnAdmin(Object[] params) {
        String method = new String((String) params[0]);
        if (admin != null) {
            ServiceUtils.invokeOnConnection(admin, method, params);
        }
        return true;
    }


Andrew Sinning wrote:
> Okay, the problem seems to be my use of "Object[] params".
>
> here's my function:
>
>    public boolean invokeOnAdmin(String method, Object[] params) {
>        return true; // we'll make it do something once we get this far!
>    }
>
> I've tried several different ways to make the call from AS3.  I get 
> slightly different errors.  Here's what I've tried:
>
>            nc.call("invokeOnAdmin", new Responder(invokeAdminResult), 
> "imHere", "myName");
>
>            nc.call("invokeOnAdmin", new Responder(invokeAdminResult), 
> "imHere", {name:"myName"});
>
>            nc.call("invokeOnAdmin", new Responder(invokeAdminResult), 
> "imHere", ["myName"]);
>
>




More information about the Red5 mailing list