Please help! Motion detection/AS 2

  • fingersox
  • Born
  • Born
  • fingersox
  • Posts: 3

Post 3+ Months Ago

Hi!

I really need some help to do with motion detection/AS 2. I'm trying to create a piece of art work that is made using Flash for a project. The basic idea is this:

1. Circles and text appear where ever web-cam motion is detected.

2. The circles and text randomly vary in size and alpha and disappear (fades) when the user moves again

Image

3. There will be an already existed list of text but they should appear randomly when the user moves

4. If the user is still enough, the animation (as shown in the second pic) will play but when the user moves again, the animation disappears.


Image

I have a basic understanding of web-cam capture (I've coded this part already) and I'm trying to learn more about motion detection right now (still stuck on this). I'm just really stuck on how to have something generate when motion is actually detected and how to have what is generated be random. I'm a little lost because my AS skills are not the best at all :S :oops: :|

I would appreciate any help you guys could give me or if you could point me in the direction of anything you think would be useful in helping with my problem then that would be awesome too. If you think some of this is not possible but there is another way to achieve similar results, please let me know. Thanks!
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Posts: 1828
  • Loc: In the Great White North

Post 3+ Months Ago

Ok so here's the basic theory behind what your trying to do. Note this is a bit easier said than done.

Motion detection can be accomplished by taking each frame of the image. Turning it into a bitmap data object (really just an array of pixel color data) and then checking each pixel to see if it has changed color from one frame to the next. Grant Skinner has a great example on his blog and here's someone else's attempt with source code.

Once you have figured out which pixels change the random content is pretty simple. I would create a bunch of different movie clips. Place them in the library and then create an array with their linkage names. When you want to display one, simply use attachMovie with a randomly selected array selection.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 11 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.