touch events vs mouse click events using actionscript 3

后端 未结 3 1837
别跟我提以往
别跟我提以往 2021-02-02 02:08

Just wanted to ask if there is any advantage for either using mouse click event or touch tap events, when writing apps for mobiles or tablets (for the iphone especially)?

<
3条回答
  •  情歌与酒
    2021-02-02 02:22

    This is probably the best documentation on Adobe AIR touch support:

    http://help.adobe.com/en_US/as3/dev/WSb2ba3b1aad8a27b0-6ffb37601221e58cc29-8000.html

    Midway through that page it states:

    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.

    The only benefit of touch, I would think, would be multi-touch. The TouchEvent has a touchPointID which allows you to track the movement of each touch point. If you don't care about multi-touch, it sounds like Mouse Events would be the way to go.

提交回复
热议问题