开发者

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

开发者 https://www.devze.com 2022-12-21 01:40 出处:网络
This appeared as I was trying to use a mouseEvent to move anobject. I placed the variables for mouseX开发者_C百科 and mouseY in the public class. I did the same for direction X and Y but there was no

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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号