Guest User

Untitled

a guest
Aug 18th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. function initialize(){
  2. //Browser.setOption('device.multitouch', 'TRUE'); // only single-touch events (default)
  3. Browser.setOption('device.multitouch', 'FALSE'); // only gestures
  4.  
  5. Browser.addRoute(Browser, 'event', Browser.getScript(), 'onevent');
  6. }
  7.  
  8. function shutdown(){
  9. Browser.deleteRoute(Browser, 'event', Browser.getScript(), 'onevent');
  10. }
  11.  
  12. function onevent(e){
  13. if (e.type == 'gesture') {
  14. trace('Multiple fingers event');
  15. } else if ((e.type == 'touchstart') || (e.type == 'touchmove') || (e.type == 'touchend')) {
  16. trace('Single finger event');
  17. } else if (e.type == 'flick') {
  18. trace('Windows 7 touch event');
  19. }
  20. }
Add Comment
Please, Sign In to add comment