Flash 时间轴脚本:它们会被跳过吗?
Flash 的 MovieClip 时间轴的创建方式可以跳过帧以保持动画平滑度和音频同步。
我的问题是,如果帧上有 ActionScript,是否有可能跳过该帧,从而不调用脚本?
或者有脚本的帧永远不会被跳过?机制是什么?
Flash's MovieClip timeline is created in such way that can skip frames to preserve animation smoothness and audio sync.
My question is, if there is ActionScript on a frame, will there be any chance the frame is skipped so the script isn't called?
Or the frames that have script will never be skipped? What is the mechanism?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不,框架脚本永远不会被跳过。从某种意义上说,Flash 内部处理每一帧;跳过帧时发生的唯一情况是它们不会渲染到屏幕上。顺便说一句,只有当音频类型为“Stream”时才会发生这种情况 - 如果音频为“Event”或没有音频播放,则不会跳过帧。
No, frame scripts are never skipped. Internally Flash processes every frame in some sense; the only thing that happens when frames are skipped is that they don't get rendered to the screen. Incidentally, that only happens when the type of the audio is "Stream" - frames are never skipped if the audio is "Event", or if there is no audio playing.
基本上,费诺马斯所说的。
当 Flash 编译 FLA 时,它会获取所有基于帧的 Actionscript 并将其粘贴到一个大的中央 AS 文件中,并继续使用内部方法在适当的时候调用这些代码块。框架脚本永远不会丢失。
What fenomas said, basically.
When Flash compiles the FLA it takes all frame based Actionscript and sticks it in one big central AS file, and proceeds to use internal methods to call those blocks of code when appropriate. Frame scripts are never lost.