I have worked yesterday on a simple implementation of a mouse gesture recognition algorithm.

Here's a demonstration.
Mouse Gesture
I'll probabaly publish a MouseGesture.as class soon, so stay tuned.

Mouse Gesture [ADD : 2007-05-17]

Open Source This project is OPEN SOURCE under RPL License.
2007-05-17 v1.0 mouse_gesture_v1_0.zip

The zip file contains the MouseGesture class + the full code of sample demo above.

Algorithm

Mouse Gesture Algorithm

  1. Each letter is defined by a n ' 8-directions gesture sequence
  2. The mouse moves are saved with the same 8-directions sensibility
  3. A Levenshtein distance is calculated from each letter to the user moves
  4. The algorithm return the best candidate (lowest levenshtein cost)

Usage

Example for the B :

gesture=new MouseGesture(stage);
gesture.addGesture("B","260123401234");
gesture.addEventListener(GestureEvent.MATCH,matchHandler);

function matchHandler(e:GestureEvent):void{
trace (e.datas+" matched !")
}