Get MovieClip in another frame

試著忘記壹切 提交于 2019-12-24 14:29:52

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/1469984/get-movieclip-in-another-frame

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!