Flash AS3 FlvPlayback 皮肤调用父 swf

发布于 2024-09-11 19:43:51 字数 265 浏览 3 评论 0原文

我有一个 FlvPlayback 皮肤,除了自定义按钮之外,它运行得非常好。基本上这个按钮需要能够调用父影片剪辑中的函数(加载 FlvPlayback,进而加载皮肤)。

我并不是真正的 Flash 开发人员,并且在 Google 上没有找到任何与此相关的内容。这似乎是一个简单的问题,但我对Flash的了解还不够。

有人能指出我正确的方向吗?

摘要:如何从外观文件中的自定义按钮调用具有 FlvPlayback 影片剪辑的基本 swf 中的函数。

谢谢

I have an FlvPlayback skin, which works really well, except the custom button. Basically this button needs to be able to call a function in the parent movieclip (that loaded the FlvPlayback, which in turn loaded the skin).

I am not really a Flash developer, and have not found anything on Google relating to this. It seems like a simple issue, but I just do not have enough knowledge of flash.

Can anyone point me in the right direction?

Summary: How to call a function in the base swf which has a FlvPlayback movieclip, from a custom button in the skin file.

Thanks

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

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

发布评论

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

评论(1

梦幻之岛 2024-09-18 19:43:51

您可以使用方括号语法调用父(或parent.parent)DisplayObject 中的几乎任何可用方法:

parent["name"]();

resp。

parent.parent["name"]();

其中 name 是您的方法的名称。

如果我没记错的话,你的skin.swf的父级应该是FLVPlayback组件,parent.parent是包含它的MovieClip,等等。您可以向按钮的 clickHandler 添加跟踪以查看哪个是正确的。

You can call just about any available method in the parent (or parent.parent) DisplayObject by using bracket syntax:

parent["name"]();

resp.

parent.parent["name"]();

where name is the name of your method.

If I remember correctly, your skin.swf's parent should be the FLVPlayback component, parent.parent the MovieClip containing it, and so forth. You can add a trace to the button's clickHandler to see which is correct.

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