我正在尝试创建一个按钮在ActionScript 3中单击时跟踪的按钮,为什么我会遇到错误1046?

发布于 2025-02-03 15:49:14 字数 307 浏览 1 评论 0原文

我正在尝试制作学校作业的游戏,并且我正在尝试制作一个按钮,目前,该按钮只会追踪它已被点击。但是,每当我尝试运行它时,都会说“ 1046:未找到类型或不是编译时间常数:鼠标效率。”这是代码:

一部分代码的图像 (显然我无法嵌入图像,所以我希望这有效...) 这是在按钮的代码中,而不是阶段。

我尝试弄清楚它并查找如何解决这个问题,但是找不到答案。我不确定原因是什么或如何解决。谁能帮我吗?

I'm trying to make a game for a school assignment and I'm trying to make a button that, for now, will just trace that it has been clicked. However, anytime I try to run it it says "1046: Type was not found or was not a compile-time constant: MouseEvent." Here is the code:

Image of part of the code
(apparently I can't embed an image so I hope this works...)
This is in the button's code, not the stage.

I've tried figuring it out and looking up how to solve this however can't find the answer. I'm not sure what the cause is or how to solve it. Can anyone help me?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文