在 Flash CS5 中向按钮符号帧添加操作

发布于 2024-09-24 18:56:26 字数 281 浏览 0 评论 0原文

由于某种原因,我无法将 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...
alt text

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

时光清浅 2024-10-01 18:56:26

您无法向按钮框架添加代码,因为它们实际上不是框架。您在舞台上创建的按钮是 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文