开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜