在另一个框架中获取MovieClip [英] Get MovieClip in another frame

查看:160
本文介绍了在另一个框架中获取MovieClip的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

解决方法解决这个问题的最简单的方法是在第一帧放置一个 mc_movieclip 的副本,并将其隐藏起来。 mc_movieclip.visible = false 会有帮助。



注意:有动画(在它的时间轴上),那么你必须在第5帧重新开始这个动画,以获得和以前一样的效果。


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?

解决方案

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.

这篇关于在另一个框架中获取MovieClip的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆