user3270870
user3270870

Reputation: 121

How to get draw directions and draw pixels in action script 3

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

Answers (1)

null
null

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

Related Questions