AS3 多点触控事件行为

发布于 2024-10-21 00:56:16 字数 193 浏览 2 评论 0原文

如果我设置 Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT; 当用户点击时仍然会调度 MouseEvent.CLICK 吗?或者只会调度 TouchEvent.TOUCH_TAP 事件?

(在支持多点触控的设备上)

If I set Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT; will there still be dispatched a MouseEvent.CLICK when the users tabs? or will there ONLY be dispatched a TouchEvent.TOUCH_TAP event ?

(on a multitouch supported device)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

江心雾 2024-10-28 00:56:16

实际上,在这种情况下,鼠标事件是针对第一个接触点调度的。这就是不适合触摸输入的 UI 元素如何继续在触摸设备上工作的原因。

至少 MOUSE_DOWN 和 MOUSE_UP 是在 TOUCH_BEGIN 和 TOUCH_END 之后立即调度的,这有时非常烦人。

Actually, mouse events are dispatched in this case for the first point of contact. That's how UI elements not suited for touch input continue to work on touch devices.

At least MOUSE_DOWN and MOUSE_UP are dispatched right after TOUCH_BEGIN and TOUCH_END which is very annoying sometimes.

拥抱我好吗 2024-10-28 00:56:16

终于找到了这个问题的答案,抱歉 Stackoverflow,我并不是想发垃圾邮件!

MultitouchInputMode.TOUCH_POINT:如果您仅对触摸事件感兴趣,而不对鼠标或手势事件感兴趣,请使用此模式。如果您想支持运行时不支持的手势,或者需要同时支持多点触控和手势,您可以使用此模式来合成您自己的手势。 (http://www.adobe.com/devnet/flash/articles/multitouch_gestures。 html)

Finally found the answer to this, sorry Stackoverflow, wasn't trying to spam!

MultitouchInputMode.TOUCH_POINT: Use this mode if you are interested only in touch events and no mouse or gesture events. You can use this mode to synthesize your own gestures if you want to support gestures that are not supported by the runtime, or if you need to support both multitouch and gestures. (http://www.adobe.com/devnet/flash/articles/multitouch_gestures.html)

唔猫 2024-10-28 00:56:16

如果其他人发现本机触摸实现有缺陷,那么以下内容可能值得研究:

Gestouch:用于鼠标、触摸和多点触摸 AS3 开发的 NUI 手势检测框架。

Gestouch 是一个 ActionScript 库/框架,可帮助您处理单点触控和多点触控手势,以构建更好的 NUI(自然用户界面)。

https://github.com/fljot/Gestouch

In case anyone else finds the native touch implementation falls short there is also the following which may be worth looking into:

Gestouch: NUI gestures detection framework for mouse, touch and multitouch AS3 development.

Gestouch is a ActionScript library/framework that helps you to deal with single- and multitouch gestures for building better NUI (Natural User Interface).

https://github.com/fljot/Gestouch

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文