A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Motion Sensoring

  1. #1
    Senior Member
    Join Date
    Mar 2010
    Posts
    107

    Motion Sensoring

    Hello there,

    I was wondering if it is possible to use motion sensoring with flash, or if it is possible on the PC yet?

  2. #2
    Will moderate for beer
    Join Date
    Apr 2007
    Location
    Austin, TX
    Posts
    6,801
    What do you mean by "motion sensor"? You can access a webcam with permission and check for differences between frames that could be due to the user moving, the camera moving, or just light changes.

    You could also attempt to use the Accelerometer, but the availability depends on the client device.

  3. #3
    Senior Member
    Join Date
    Mar 2010
    Posts
    107
    Accelerometer is close to what I mean. I want the user to make movements in front of the PC while running the application. The application is a school project and I came up with the idea to let the application in question react on it's users movements. So when the user makes bigger movements with his arms, it should for instance increase the sound volume and when the user returns to smaller movements, it should decrease the sound volume. Am I right to believe that I need some sort device to accomplish this? Or is it possible with the PC alone?

  4. #4
    Will moderate for beer
    Join Date
    Apr 2007
    Location
    Austin, TX
    Posts
    6,801
    If the thing running the flash is not the thing that's moving, then accelerometer won't help you. In your scenario, the thing running the flash is a computer, and the thing moving is the user's hands in front of the computer, right?

    For your use case, I'd try using the webcam and some tracking techniques. Perhaps have the user hold distinct brightly colored objects that will be easy to pick out in camera captures, kinda playstation Move style. I published some code to do meanshift tracking on a webcam a while back, that might help you out. I'll see if I can find it.
    Oh, here it is: http://cosmodro.me/blog/2009/mar/24/...-one-mr-shift/
    Other interesting webcam approaches would be flARkit, which uses printed markers to overlay 3d objects on a scene. You could get motion data from that.
    Or ASSurf can also do marker-based tracking.

  5. #5
    Senior Member
    Join Date
    Mar 2010
    Posts
    107
    This is damn awesome, thanks alot. I'll try my best to create something cool and post it perhaps, if you are interested.

    Many thanks again.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center