The 'client' property of NetConnection instances seems to behave differently on the server side.
Say I have FMS apps A and B. Now I want to connect from B to A using NetConnection like this:
var bClient = new NetConnection();
bClient.client = { foo:function(){ trace ('Foo called!') } }
bClient.connect(APP_A_URI);
App A accepts the client and then issues client.call('foo')
.
In the logs from B I then get Sending error message: Method not found (foo)
.
Obviously there's no 'client' object on then server version of NetConnection.
If I define bClient.foo = function(){ ... }
instead, it all works but I have to redefine all methods on the NetConnection instance which seems dumb.
How do U guys treat this situtation? Inherit NetConnection or its prototype or what? : ) A little example would be much appreciated!
Thanks, Carsten!