什么是错误:与命名空间 public 中的继承定义 flash.display:DisplayObject.mouseX 存在冲突?

发布于 2024-08-22 15:24:04 字数 99 浏览 2 评论 0原文

当我尝试使用 mouseEvent 移动对象时出现这种情况。 我将 mouseX 和 mouseY 的变量放在公共类中。我对 X 和 Y 方向执行了相同的操作,但没有出现任何错误消息。

This appeared as I was trying to use a mouseEvent to move an object.
I placed the variables for mouseX and mouseY in the public class. I did the same for direction X and Y but there was no error message for those.

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

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

发布评论

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

评论(1

萌无敌 2024-08-29 15:24:04

如果您要添加 mouseX 的类扩展了 DisplayObject 类型(并且如果它是任何类型的 Flex 组件),则您已经拥有一个具有该名称的变量来自那种类型。作为修复名称,您的变量可以是其他名称,例如。 myMouseX。如果您不知道我到底要如何扩展类,请查看 ActionScript 中的面向对象编程

If the class you are adding the mouseX to is extending the DisplayObject type (and if it's any kind of Flex component than it does), you already have a variable with that name from that type. As a fix name your variable something else eg. myMouseX. If you don't know what exactly I'm taking about with extending classes, check the tutorial on Object-oriented programming in ActionScript.

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