服务器端actionscript:NetConnection上的“找不到方法”错误

时间:2010-08-06 11:42:38

标签: actionscript flash-media-server netconnection

NetConnection实例的“client”属性在服务器端似乎表现不同。

假设我有FMS应用程序A和B.现在我想使用NetConnection从B连接到A:

var bClient = new NetConnection();
bClient.client = { foo:function(){ trace ('Foo called!') } }
bClient.connect(APP_A_URI);

App A接受客户端,然后发出client.call('foo')

在B I的日志中,然后获取Sending error message: Method not found (foo)

显然,NetConnection的服务器版本上没有“客户端”对象。 如果我改为定义bClient.foo = function(){ ... },它一切正常,但我必须重新定义NetConnection实例上的所有方法,这看起来很愚蠢。

你们怎么对待这种情绪?继承NetConnection或其原型还是什么? :) 一个小例子将非常感激!

谢谢,卡斯滕!

0 个答案:

没有答案
相关问题