问题描述
这似乎为我试图用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.
推荐答案
如果您要添加的 mouseX
来被扩展类的DisplayObject
类型(如果它是任何一种比它Flex组件),你已经与从类型名称的变量。作为一个固定的名字您的变量别的东西,例如。 myMouseX
。如果你不知道究竟我正在与有关扩展类,检查的。
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.
这篇关于什么是错误:存在着继承定义flash.display使用冲突:DisplayObject.mouseX在公共空间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!