Skip to main content
Known Participant
July 13, 2011
Question

mouse Events on iOS Touch Devices

  • July 13, 2011
  • 2 replies
  • 914 views

I've noticed that mouse events like CLICK and MOUSE_DOWN work on the iPhone and iTouch devices.  Is there a down side to using Mouse events instead of the Gesture and touch events?

-dis

This topic has been closed for replies.

2 replies

Participating Frequently
July 19, 2011

I used before mouseClick until I had to make two options with one finger.

Play song one a click

Sync song with finger move over component.

This was archived with this.

private function tapBegin(evt:TouchEvent):void {
               _isTab = true;
               
               if ( !isIconLabelItemRenderer(evt.target) ) {
                    return;
               }
               
               _touchTarget = evt.target as IconLabelItemRenderer;
          }
          
          private function tapMove(evt:TouchEvent):void {
               _isTab = false;
               
               if ( !isIconLabelItemRenderer(evt.target) ) {
                    _touchTarget = null;
                    return;
               }
               
               if ( !_touchTarget ) {
                    return;
               }
               
               if ( _touchTarget.data.identifier != evt.target.data.identifier ) {
                    _touchTarget = null;
                    return;
               }     
          }
          
          private function tapEnd(evt:TouchEvent):void {
               if ( !_touchTarget ) {
                    return;
               }
               
               if ( _isTab ) {
                    Player.add(_touchTarget.data);
                    Logger.m(evt.type + " : " + "click");
               } else {
                    DownloadManager.add(_touchTarget.data);
                    Logger.m(evt.type + " : " + "slide");
               }
          }

Participating Frequently
July 14, 2011

Hi,

It depends on the user experience that you want to give. Touch events are similar to mouse events, except that you track more than one of them simultaneously - like moving a character in a game and firing. If you plan to give capabilities like PAN, ROTATE, SWIPE OR ZOOM, you should consider using Gestures. However, if using mouse events solves your purpose, you could use them too. There is no downside to using mouse events.

Thanks,

Sanika