What is the error :a conflict exists with inherited definition flash.display:DisplayObject.mouseX in namespace public?

一笑奈何 提交于 2019-12-13 06:33:15

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/2310961/what-is-the-error-a-conflict-exists-with-inherited-definition-flash-displaydis

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!