     {
         super.removeEventListener(type, listener, useCapture);
 
-        if (type == MouseEvent.CLICK ||
-            type == MouseEvent.DOUBLE_CLICK ||
-            type == MouseEvent.MOUSE_DOWN ||
-            type == MouseEvent.MOUSE_MOVE ||
-            type == MouseEvent.MOUSE_OVER ||
-            type == MouseEvent.MOUSE_OUT ||
-            type == MouseEvent.ROLL_OUT ||
-            type == MouseEvent.ROLL_OVER ||
-            type == MouseEvent.MOUSE_UP ||
-            type == MouseEvent.MOUSE_WHEEL)
-        {
-            if (--mouseEventReferenceCount == 0)
-                hasMouseListeners = false;
+        // see comment above in addEventListener()
+        // mouse events, then touch events, then gesture events
+        switch (type)
+        {
+            
+            case MouseEvent.CLICK:
+            case MouseEvent.DOUBLE_CLICK:
+            case MouseEvent.MOUSE_DOWN:
+            case MouseEvent.MOUSE_MOVE:
+            case MouseEvent.MOUSE_OVER:
+            case MouseEvent.MOUSE_OUT:
+            case MouseEvent.ROLL_OUT:
+            case MouseEvent.ROLL_OVER:
+            case MouseEvent.MOUSE_UP:
+            case MouseEvent.MOUSE_WHEEL:
+            case TouchEvent.TOUCH_BEGIN:
+            case TouchEvent.TOUCH_END:
+            case TouchEvent.TOUCH_MOVE:
+            case TouchEvent.TOUCH_OUT:
+            case TouchEvent.TOUCH_OVER:
+            case TouchEvent.TOUCH_ROLL_OUT:
+            case TouchEvent.TOUCH_ROLL_OVER:
+            case TouchEvent.TOUCH_TAP:
+            case GestureEvent.GESTURE_TWO_FINGER_TAP:
+            case PressAndTapGestureEvent.GESTURE_PRESS_AND_TAP:
+            case TransformGestureEvent.GESTURE_PAN:
+            case TransformGestureEvent.GESTURE_ROTATE:
+            case TransformGestureEvent.GESTURE_SWIPE:
+            case TransformGestureEvent.GESTURE_ZOOM:
+                if (--mouseEventReferenceCount == 0)
+                    hasMouseListeners = false;
         }
     }
     

        super.addEventListener(type, listener, useCapture, priority, 
            useWeakReference);

        if (type == MouseEvent.CLICK ||
            type == MouseEvent.DOUBLE_CLICK ||
            type == MouseEvent.MOUSE_DOWN ||
            type == MouseEvent.MOUSE_MOVE ||
            type == MouseEvent.MOUSE_OVER ||
            type == MouseEvent.MOUSE_OUT ||
            type == MouseEvent.ROLL_OUT ||
            type == MouseEvent.ROLL_OVER ||
            type == MouseEvent.MOUSE_UP ||
            type == MouseEvent.MOUSE_WHEEL)
        {
            if (mouseEventReferenceCount++ == 0)
                hasMouseListeners = true;
        }
    }


import flash.display.DisplayObject;
import flash.display.Sprite;
import flash.events.Event;
import flash.events.GestureEvent;
import flash.events.MouseEvent;
import flash.events.PressAndTapGestureEvent;
import flash.events.TouchEvent;
import flash.events.TransformGestureEvent;
import flash.filters.ShaderFilter;
import flash.geom.Point;
import flash.geom.Rectangle;
