You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -213,9 +213,16 @@ There are a bunch of signals to listen on each object... taken from AS3, and JS.
213
213
- onMouseOver
214
214
- onMouseOut
215
215
- onMouseScroll
216
+
- onLongPress(Duration duration,double distance)
216
217
217
218
They all emit a `MouseInputData` with all the needed info inside, like stage coordinates, or translated local coordinates, which "mouse" button is pressed, etc.
218
219
220
+
Specially on event `onLongPress`, the handler register function differcent others, it’s includes two params for configure the event, one of `Duration duration`, it’s mean keep press how long for trigg the event, another is `distance`.
221
+
222
+
Why need `distance` ?
223
+
224
+
Beacuse of human can not keep static on screen, so, we are always trigged event `MouseMove`, but event `LongPress` will be cancelled automaticlly other event happed. It’s also mean when I pressed screen and other event happed before `duration`, So, it’s NOT LONG PRESS.
0 commit comments