Flash AS3触摸屏非移动解决方案

时间:2013-08-04 05:49:10

标签: windows actionscript-3 touch flash

美好的一天,我的测试PC上有一个触摸屏面板(电阻式)(运行Windows 8 - 非移动设备!)。

启用触控模式:* Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT; *

MouseEvent.CLICK 点击不能使用我的movie_clip /按钮。

TouchEvent.TOUCH_TAP - 太无法正常工作

我控制住了 Multitouch.maxTouchPoints 返回 0

但属性 Multitouch.supportsTouchEvents 返回 true

Multitouch.maxTouchPoints 它应该返回 1 ???

抱歉英语不好。

1 个答案:

答案 0 :(得分:0)

Multitouch.maxTouchPoints是最大并发触摸点数。如果您的系统只有1,这相当于使用MouseEvents。

事实上,甚至Adobe都声称使用TouchListener会消耗比MouseEventListeners(http://help.adobe.com/en_US/as3/dev/WSb2ba3b1aad8a27b0-6ffb37601221e58cc29-8000.html)更多的资源。

您最好通过设置禁用所有TouchEvent Multitouch.inputMode = MultitouchInputMode.NONE;或简单地删除 Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;

你的应用程序仍会对触摸做出反应,只是Actionscript将其称为MouseEvent。 如果你想自己处理手势,你可以听:

MouseEvent.MOUSE_DOWN
MouseEvent.MOUSE_MOVE
MouseEvent.MOUSE_UP