获取另一帧中的MovieClip

发布于 2024-08-06 12:10:43 字数 149 浏览 6 评论 0原文

我在电影的第一帧中,我想使用 getChildByName("mc_movieclip");获取对 mc_movieclip 的引用。问题是 mc_movieclip 不存在于第 1 帧中,而只存在于第 5 帧中。即使它位于另一个帧中,我怎样才能获得对此 MovieClip 的引用?

I'm in frame 1 of a movie, and I want to use getChildByName("mc_movieclip"); to get a reference to mc_movieclip. The problem is that mc_movieclip does not exist in frame 1 but only in frame 5. How can I get a reference to this MovieClip, even though it's in another frame?

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

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

发布评论

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

评论(1

故人如初 2024-08-13 12:10:43

解决此问题的最简单方法是将 mc_movieclip 的副本放在第 1 帧上并将其隐藏。 mc_movieclip.visible=false 就可以了。

注意:如果您的 mc 有动画(在其时间轴中),那么您必须在第 5 帧上重新启动该动画才能获得与之前相同的效果。

The easiest way to fix this is that you put a copy of mc_movieclip on frame 1 and make it hidden. mc_movieclip.visible=false will do the trick.

Note: if your mc has animation (in its timeline) then you have to restart that animation on frame 5 to get the same effect as before.

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