开发者

Flex/as3: How to get the name from a NetStream object?

In a Flex NetStatusEvent of type NetGroup.MulticastStream.PublishNotify, you get the String name of t开发者_如何转开发he stream in e.info.name

The name is what the publisher specified in the .publish ("") method.

But in a NetStatusEvent of type NetStream.Connect.Success, there is no such property. Instead, the whole NetStream object is available through e.info.stream

How the heck to you get something as basic as the name from the NetStream object? e.info.stream.name does not exist.

I must be overlooking something very simple.


Yes, as expected, the solution is very simple. The NetStream.Connect.Success event fires as soon as the NetStream is initialized. It can be used to .play any published stream - in other words, it has not been assigned a .publish'ed name at this point.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜