flex4:使用 swfloader 从加载的 swf 中获取事件

发布于 2024-08-15 09:15:19 字数 114 浏览 3 评论 0原文

我有一个使用 SWFLoader 类加载子 swf 的主 swf。子 swf 正在使用 NetConnection 类连接到 adobe flash 媒体服务器。我想使用父 swf 显示有关连接的状态。我该怎么做?

I have a master swf that loads a child swf using SWFLoader class. the child swf is connecting to adobe flash media server using NetConnection class. using the parent swf i want to to display status regarding the connection. how can i do that ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

别挽留 2024-08-22 09:15:19

Tour de Flex 上的 swfloader 类相关示例中有一个关于如何执行此操作的示例。
因此,查看示例并阅读以下 URL 可以解决问题。

在 AS3 中创建和调度自定义事件

http://www.flashcoder.net/blog/?p =100

一开始它对我不起作用,但后来我注意到一个非常相似的问题:
如何从 SWFLoader 中的 SWF 向父 Flex 应用程序引发事件?

我注意到 bubbles 变量在本应为 true 时却默认为 false。
这解决了我的问题。

there is an example on how to do so at Tour de Flex on the swfloader class related example.
so seeing the example plus reading the following URL resolved the issue.

Creating and Dispatching Custom Events in AS3

http://www.flashcoder.net/blog/?p=100

it didn't work for me at first but then i noticed a very similar question at:
How to raise an event from a SWF in a SWFLoader to a parent Flex application?

and i noticed that the bubbles variable defaulted to false when it was supposed to be true.
that solved my problem.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文