flash - How to get the MouseEvent.localX and localY of a target but not its child objects? -
I am creating a simple drawing application that adds a new shape to the movieclip "canvas" every time the user clicks And makes drugs. The problem is, I am seeing that because the Mouse Event listeners have been set on the movieclip, the hair figure objects are also being returned as a target. It is also disrupted between localX and local Y, due to which locally the shape mouse is currently ending in order to move from the entire movie clip locally to jump around the drawing cursor.
Is there any way to get the most parental targets from MouseEvent?
You probably want to set DisplayObjectContainer :: mouseChildren
to
... or you incorrect
... In addition, you can do currentTarget
, which should be your MovieClip
and its DisplayObject :: mouseX
and < Code> DisplayObject :: mouseY MouseEvent :: stageX
and MouseEvent :: stepY
and then DisplayObject :: globalToLocal
to convert it to its MovieClip
coordinate location ...
little sidenote: why MovieClip
no more phantom
?
Edit: Why do not I use it like MovieClip
, it's dynamic, so you can not find any compiler errors on the typo ...
Congratulations
back2dos
Comments
Post a Comment