Flash Media Server NetConnection 与客户端对象的问题
我使用以下命令成功连接到 fms:
netConnection = new NetConnection();
netConnection.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
netConnection.client = new Object();
netConnection.connect( AppConfig.FMS_ADDRESS );
现在在事件处理程序中:
if ( event.info.code == "NetConnection.Connect.Success" ) {
trace( netConnection.client.id );
remoteSlices = SharedObject.getRemote( "slices", netConnection.uri, true );
remoteSlices.addEventListener( SyncEvent.SYNC, onRemoteSync );
remoteSlices.connect( netConnection );
}
我的问题是,netConnection.client.id 未定义,而同时在服务器上我可以毫无问题地跟踪客户端 id。
我在这里做错了什么?
i am connecting successfully to an fms with the following command:
netConnection = new NetConnection();
netConnection.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
netConnection.client = new Object();
netConnection.connect( AppConfig.FMS_ADDRESS );
now in the event handler:
if ( event.info.code == "NetConnection.Connect.Success" ) {
trace( netConnection.client.id );
remoteSlices = SharedObject.getRemote( "slices", netConnection.uri, true );
remoteSlices.addEventListener( SyncEvent.SYNC, onRemoteSync );
remoteSlices.connect( netConnection );
}
my problem is, that the netConnection.client.id is undefined, while at the same time on the server i can trace the client id without a problem.
what am i doing wrong here?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
netConnection.client
是一个空对象,正如您所定义的那样,具有以下行:要检索客户端的 id,您必须将其从服务器发送到客户端。 我确信您知道该怎么做 :)。
The
netConnection.client
is an empty object, just as you defined it to be, with the following line:To retrieve the id of the client you'll have to send it from the server to the client. I'm sure you know how to do that :).