有这个代码:
nc.call("test", new Responder(onCallSuccess,onCallFailed), "user1");
和
public function onTest(id:String):void {
Alert.show("test called from server");
}
结果:
`ReferenceError: Error #1069: Property onTest not found on flash.net.NetConnection and there is no default value`.
我该如何解决这个问题? 我尝试了很多不同的方法,似乎数据是从服务器应用程序正确发送的,但 Flex 无法“吃掉它”
最佳答案
您需要添加nc.client = this
,以便服务器知道在哪里调用方法。
关于apache-flex - flex netconnect (在 flash.net.NetConnection 上未找到属性 onTest 并且没有默认值),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9785569/