flex NetStream.DIRECT_CONNECTIONS 存在吗?
我正在尝试运行在 Flex Builder 3 中下载的源代码 但我收到一些错误:
就像这一行:
sendStream = new NetStream(nc,NetStream.DIRECT_CONNECTIONS);
通过静态类型 Class 的引用访问可能未定义的属性 DIRECT_CONNECTIONS。
这里
myPeerID = nc.nearID;
//nc 是 NetConnection 并且代码完成也没有向我显示 NetConnection 的近 ID 属性
i am trying to run a source that i downloaded in Flex Builder 3
but i get some errors:
like on this line:
sendStream = new NetStream(nc,NetStream.DIRECT_CONNECTIONS);
Access of possibly undefined property DIRECT_CONNECTIONS through a reference with static type Class.
and here
myPeerID = nc.nearID;
//nc is NetConnection
and code completion also doesn't show me the nearID property of the NetConnection
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
问题是 NetStream.DIRECT_CONNECTIONS 是 Flex 4 的一部分,在 Flex 3 中不可用。
检查:
http://livedocs.adobe.com/flex/gumbo/langref/flash/net/NetStream.html#DIRECT_CONNECTIONS
The problem is NetStream.DIRECT_CONNECTIONS s part of flex 4 and is not available in flex 3.
check:
http://livedocs.adobe.com/flex/gumbo/langref/flash/net/NetStream.html#DIRECT_CONNECTIONS
确保将所需的 Flash 播放器版本设置为 10。如果您使用的是 Flex Builder 3,则可以在项目的 Flex 编译器属性中进行设置。
Make sure you set the Required Flash player version to 10. If you are using Flex Builder 3 you can set this in the Flex Compiler properties for your project.