Please help! Motion detection/AS 2

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

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

  2. 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.

I have a basic understanding of web-cam capture and I’m trying to learn more about motion detection right now. I’m just really stuck on how to have something generate when motion is actually generated and how to have what is generated by random. I’m a little lost because my AS skills are not the best at all :S

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!