在 Flash CS5 中向按钮符号帧添加操作
由于某种原因,我无法将 ActionScript 动作添加到按钮元件内的时间线框架中,就像我通常使用 MovieClip 元件或在舞台上一样。动作面板显示以下消息:
“在 ActionScript 3.0 中,代码不能直接放置在对象上。请选择一个框架...”,
即使我明确选择了一个框架!
有什么想法吗?
编辑:根据要求截图。正如您所看到的,明确选择了一个框架......
For some reason I can't add ActionScript actions to a timeline frame within a Button Symbol, like I normally would with MovieClip symbols or on the stage. The Actions panel shows this message:
"In ActionScript 3.0, code cannot be placed directly on objects. Please select a frame..."
even though I definetely have a frame selected!
Any ideas?
EDIT: Screenshot as requested. As you can see, a frame is clearly selected...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您无法向按钮框架添加代码,因为它们实际上不是框架。您在舞台上创建的按钮是 SimpleButton 类< 的实例/a>.
从该类的文档中您可以看到它不是从 MovieClip 继承的,因此它没有框架。只是 IDE 让它看起来有点像框架。解决方案是将它们制作为 MovieClip。
You can't add code to the frames of buttons because they are not actually frames. The buttons you create on stage are instances of the SimpleButton class.
From the documentation of the class you can see that it does not inherit from MovieClip so it has no frames. It's just that the IDE makes it kinda look like frames. The solution is to make them MovieClips.