使用动作脚本中的基类对时间轴帧执行操作
我有一个带有影片剪辑的 fla 文件。影片剪辑有一个执行某些操作的基类。该 fla 作为 SWC 导出。我想要的是能够从其基类向影片剪辑添加动作,而不必像 onEnterFrame 那样执行操作。
有想法吗?
I have fla file with a movieclip. The movieclip has a baseclass where some actions are performed. This fla is exported as an swc. What I want is to be able to add actions to the movieclip from it's base class, without having to do it like onEnterFrame.
Ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
MovieClip 中有一个未记录的方法,名为 addFrameScript这将完全做到这一点:(
帧号是从零开始的,而不是像 gotoAndPlay 那样从一开始)
There's an undocumented method within MovieClip called addFrameScript which will do exactly that:
(the frame number is zero based instead of one based like gotoAndPlay's)