Experiments with Motion Detection in the Flash

Basically it was used BitmapData Class and the methods: draw, threshold, getColorBoundsRect and getPixel. In the first three samples the detection is accomplished by the coordinates x and y (getColorBoundsRect) and in the last two samples for detection by colors (getPixel).

Simple detection


Detection and fire


Playing keyboard (with sound)


Playing boxes (with sound)


Color detection


9 Responses to “Experiments with Motion Detection in the Flash”

  1. Will Says:

    Erick, these are fantastic experiments, in that they are basic enough to grasp the fundamental possibilities. We have just returned from the Flash Forward conference in Boston, MA, and are full of ideas. Unfortunately, when it comes to using the camera class withOUT flash media server, Adobe’s documentation is sparse at best. If you don’t mind, what are some of your resources for learning this stuff? We are diving in, and are looking for answers, from which to build our own experiments. Again, these are great experiments!

  2. Webcam Motion Detection in Flash — Knut Urdalen’s Blog Says:

    […] whole process is described in this tutorial. I also found some other examples. If you have any references on using webcam motion detection, please post it in the […]

  3. Bolo Says:

    Could you post your sources ?

    thanks

  4. Thomas Gooday Says:

    This is amazing, exactly what i have been searching for.
    Could you possibly send me the source codes for the colour detection, as I am intending on integrating this facility with motion detection to create a game.
    If not could you produce/ supply me with a tutorial on how to complete this.

  5. brice Says:

    i’m trying to use some of the basic principles that you are using in these experiments. for now i’m just looking for a way to interact with something on the screen, like the first experiment with the red ball moving around. could you possibly send me the source code? thanks a lot.

  6. brice Says:

    p.s. i’m using a.s. 2.0

  7. Gary Says:

    Great work Erick. Would it be possible for you to send me the source of the Playing boxes (with sound.) Ive been struggling with something similar is AS3 for quite a while now.

    Any help would be greatly appreciated!

  8. Andrea Says:

    hi! may i have the source code? tnk! :o)

  9. MikeM Says:

    Cool work! Yes, can you share source code for study it and make it better? Thanks!

Leave a Reply