Reputation: 121
I would like to get the touch screen drawing position (x and y) and direction (moving up or down or left or ....), then I will compare it with some stored positions and directions for characters (as we are trying to teach character writing). Isn't there any known library or helping things for this? Thanks in advance
Upvotes: 0
Views: 26
Reputation: 5255
Every DisplayObject
has the properties mouseX
and mouseY
, that indicate the mouse position with respect to its origin.
To get the direction, save the values of both properties and compare them to the next ones. Say for example within the handler of a MouseEvent.MOUSE_MOVE
Event
.
Upvotes: 1