Event Passing

What events are dispatched

The following MultiTouchEvent types will be dispatched by MultiTouchDispatcher, in the following order:

  • OVER (finger enters area of visual object)
  • DOWN (finger first appears and is pressed down on top of a visual object)
  • MOVE (finger position update, while finger keeps touching MT surface)
  • UP (finger disappears on top of a visual object)
  • OUT (finger which was previously on top of a visual object is no longer on top of the same visual object, due to moving out or being lifted)
  • TAP (finger is pressed and lifted in the same approximate position, within a configurable time interval, on top of the same visual object)
  • SAMPLE_ENDS (no more events for this sample - complex Widget multi-finger SRT interaction can be calculated now)

However the order presented above is slightly simplified. E.g. all new fingers will dispatch first OVER and then DOWN per finger, so if two new fingers come down on top of an InteractiveObject, it will receive events OVER, DOWN, OVER, DOWN, instead of OVER, OVER, DOWN, DOWN.

In a future release MultiTouchEvent will get a field for fingerDown : Boolean, if the MultiTouch system starts supporting hovering.

Note that getting events is not all just about being hit by a finger. An InteractiveObject can also grab ownership of a Hand or an individual Finger. In that case that InteractiveObject will get events from those/ that Finger even though the Finger is no longer on top of the InteractiveObject. Also if a Finger is owned by some InteractiveObject, it will not dispatch events to any other InteractiveObject even when it hits one. If a Finger is owned, it is completely reserved for that InteractiveObject. However the events will still propagate from the owner down the scene hierarchy all the way to the scene root, according to the normal Flash event model.

In addition to the MultiTouchEvents, the following MouseEvent types will be dispatched when the MultiTouchManager instance's useMouseEvents property is set to true:

  • MOUSE_OVER (finger enters area of visual object)
  • ROLL_OVER (finger enters area of visual object)
  • MOUSE_DOWN (finger first appears and is pressed down on top of a visual object)
  • MOUSE_MOVE (finger position update, while finger keeps touching MT surface)
  • MOUSE_UP (finger disappears on top of a visual object)
  • MOUSE_OUT (finger which was previously on top of a visual object is no longer on top of the same visual object, due to moving out or being lifted)
  • ROLL_OUT (finger which was previously on top of a visual object is no longer on top of the same visual object, due to moving out or being lifted)
  • CLICK (finger is pressed and lifted in the same approximate position, within a configurable time interval, on top of the same visual object)

It should be noted that only one finger causes these events to be sent at a time. When there is no finger marked as the active mouse finger, the system picks the next new finger as the mouse finger. The finger keeps its mouse finger status until it is raised, after which the system again waits for the next new finger.