如何监听两个水龙头和手势在iOS版的同时在Adobe AIR? [英] How to listen for both tap and gestures at the same time in Adobe AIR for iOS?

查看:236
本文介绍了如何监听两个水龙头和手势在iOS版的同时在Adobe AIR?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我作出的iOS游戏,我需要一个检测既简单攻丝和手势(刷卡等)的同时的。在AIR中,我只看到一个设置为多点触控输入方式:TOUCH_POINT(其中工程基本攻丝)和姿态。但我同时需要在同一时间,以便改变模式是不是一种选择。我怎么能听都在同一时间?

I am making an iOS game and I need a detection for both simple tapping and gestures (swipe etc) simultaneously. In AIR, I can only see one setting for the Multitouch input mode: TOUCH_POINT (which works for basic tapping) and GESTURE. But I need both at the same time so changing the mode isn't an option. How can I listen to both at the same time?

谢谢, 可以。

推荐答案

您可以使用标准的鼠标事件用于自来水。

You can use standard mouse events for tap.

这将保持多点触控手势输入方式。

This would maintain gesture multitouch input mode.

另外, Gestouch框架:NUI手势检测框架鼠标,在GitHub上触摸和多点触控AS3发展可能有兴趣。

另外请注意性能触摸/手势影响事件模型:

Also note performance impacts of touch / gesture event model:

触摸和手势输入可以是多点触控输入视   用户的设备。 ActionScript提供API,用于处理触摸事件,   手势事件,并单独跟踪的触摸事件的多点触控   输入。

Both touch and gesture input can be multitouch input depending on the user’s device. ActionScript provides API for handling touch events, gesture events, and individually tracked touch events for multitouch input.

注:监听触摸和手势事件可以消耗显著   的处理资源量(相当于呈现若干帧   每秒),这取决于该计算设备和操作系统上。   它往往是最好使用鼠标事件时,你实际上并不需要   通过触摸或手势提供的额外功能。当你使用   触摸或手势事件,考虑减少图形的数量   可能发生的变化,尤其是当这样的事件可以被分派   迅速,作为泛期间,旋转或变焦操作。例如,   可以在用户调整其大小在组件中停止动画   使用缩放手势。

Note: Listening for touch and gesture events can consume a significant amount of processing resources (equivalent to rendering several frames per second), depending on the computing device and operating system. It is often better to use mouse events when you do not actually need the extra functionality provided by touch or gestures. When you do use touch or gesture events, consider reducing the amount of graphical changes that can occur, especially when such events can be dispatched rapidly, as during a pan, rotate, or zoom operation. For example, you could stop animation within a component while the user resizes it using a zoom gesture.

这篇关于如何监听两个水龙头和手势在iOS版的同时在Adobe AIR?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆