Flash AS3 FlvPlayback皮肤调用父swf(Flash AS3 FlvPlayback Skin calling parent swf)

编程入门 行业动态 更新时间:2024-10-11 05:23:52
Flash AS3 FlvPlayback皮肤调用父swf(Flash AS3 FlvPlayback Skin calling parent swf)

我有一个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

最满意答案

您可以使用括号语法调用父(或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.

更多推荐

本文发布于:2023-08-02 19:58:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1379771.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:皮肤   FlvPlayback   Flash   parent   calling

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!