Created
August 30, 2014 23:48
-
-
Save edwardsanchez/b14f2408cb4d5c5f3e9b to your computer and use it in GitHub Desktop.
If just using event.x it doesn't work on a touch device and you'll get NaN
To get the x and y coordinates you must add event = Events.touchEvent(event) and then call for event.clientX instead of event.x
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dragger = new Layer | |
x: 0 | |
y: 100 | |
width: 100 | |
height: 100 | |
Dragger.draggable.enabled = true | |
Dragger.on Events.DragMove, (event)-> | |
event = Events.touchEvent(event) | |
print event.clientX, event.clientY |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment