Skip to main content
Participant
June 18, 2014
Question

MultiTouch.mapTouchToMouse=false has no effect ?

  • June 18, 2014
  • 1 reply
  • 432 views

Running on Windows, AIR 14,

To test this, I set up :

Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;

Multitouch.mapTouchToMouse = false;

addEventListener(MouseEvent.CLICK, function() { trace('x') } );

When I tap using touch I get the trace... Do I need to do something special for mapTouchToMouse to take effect ?

Thanks!

This topic has been closed for replies.

1 reply

June 18, 2014

A few questions for you. What version of Windows are you using? When on the Desktop, if you touch the screen, does the mouse cursor jump to that point? If it isn't visible can you plug in a USB mouse and move it after touching the screen to see if the mouse's starting point was where you last touched. It could be a bug in AIR or it could be that on the Desktop in Windows it treats all single touches as a "mouse" click and so that is what AIR reports. I only suggest the last part because Adobe doesn't support the Metro UI in Windows 8.X

Participant
June 30, 2014

Hi,

Thanks for the response. Sorry I was away and wasn't able to reply. To answer the questions:

1. I'm on Windows 8.1, desktop environment (AIR doesn't run on Metro)

2. Since I'm on Windows 8+, touching the screen in the desktop will show the touch feedback, so I know for sure the system detect and differentiate mouse and touch

I also did some check in AIR with multitouch.maxTouchPoints, and got back 10 (ten) which means system's all good.

Have you/anyone had successful experience differentiating touch and mouse in Air ?

June 30, 2014

I have done multitouch in AIR for Android but not yet tested in Windows. I have a friend at work who brings in his Windows 8.1 touch screen laptop to mess with Unity during lunch, so I can make a test app for him to try out and see what results we get. I need a little more information from you though to make sure I match your environment. Did you only test in the preview in Flash or did you create an app and install it? If you created an app, did you use captive runtime or did you create a .air file that requires AIR to be on the machine? Lastly, in your test code from your first post, was there any assets on the stage at all or was it a blank FLA with just code?