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


90 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. Flo Says:

    Hi,

    really cool webcam experiments! 4 months ago I published my Interactive Webcam Package for ActionScript 3 and 2 ( http://www.derhess.de/weblog_detail.php?id=47 ). My Classes seem to work very similair as yours. Also Benjamin Bojko from Germany implemented very cool Color Tracking classes, too. (http://www.bbojko.de/?p=26 , http://www.bbojko.de/?p=29). I think there are a lot of more cool possibilities with webcam interaction. Keep up coding! :-)

  8. 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!

  9. Andrea Says:

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

  10. MikeM Says:

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

  11. Pwhndvve Says:

    Honi soit the dazzlingly buy cytotec meat steamed held.

  12. Jaze Says:

    hi! where can I find the tutorials for these?

  13. tom Says:

    hey nice examples! :)
    are there any tutorials or source codes available? specially i’m looking for something like your first example “Simple detection”.

    please let me know.
    thanks
    tom

  14. Robby Says:

    Hi there! Your examples of work on here are awesome! i am currently trying to implement something simular to this for a university project. i was wondering if you would be willing to share the source code, or just point me in the right direction. I’ve noticed that a lot of people have requested this but i am not sure if you replied to them. Any help would be most apreciated! Thanks!

  15. alex Says:

    hai…
    by seeing your work i am so eager to know more about your impressive work…
    can you help me…. with a tutorial…
    or please help me with a source code..

  16. A. Cortes Says:

    Hi Erick! Let me conrgratulate you about your job, i think that is amazing. Can u please send me a copy fo your source code, im trying new things adn i like to learn to use flash and webcams techologies. Thank you very much.

  17. sandrar Says:

    Hi! I was surfing and found your blog post… nice! I love your blog. :) Cheers! Sandra. R.

  18. angelina jolie Says:

    I love your site. :) Love design!!! I just came across your blog and wanted to say that I’ve really enjoyed browsing your blog posts. Sign: ndsam

  19. megan fox Says:

    Sign: umsun Hello!!! rcuwwymhyw and 5903ssgfhphzye and 3438Great Blog!

  20. katty11 Says:

    Sign: bmzaf Hello!!! tcxtr and 1026kzavbpqnvp and 5290 My Comments: Great!

  21. haikal Says:

    hi im haikal from The one academy college in Malaysia,taking multimedia as my major.i want to asking you for your help about your “Playing keyboard (with sound)” project. ive got my final project using a projection floor interactive game.i dont have any idea how to do that until i saw your website. can u teach me how to coding this project? kind of like a stepping on the floor and the beat will be hear.
    (i apologize with my bad english)

  22. pictures of miley cyrus Says:

    Sign: zbdtg Hello!!! pukcz and 2542bdmeemcbdr and 7954 : Great!

  23. jervieriesype Says:

    Sta kazete o njenim stopalima?
    Uclanio sam se na njen site i mogu reci da ima jako lijepa stopala!
    Stopala su na njoj najbitnija stavka!

  24. Lee, Eun Taeg Says:

    Hi Erick
    I’m student who study in Korea.
    I’m sorry but can you send me the source of ‘playing boxes’?
    thank you very much.

    my e-mail : lut83@hanmail.net or letsky00@hotmail.com

  25. Josh south Says:

    Hello!
    I am a masters student working on my thesis project. It involves many similar concepts such as yours. I would like to see if its possible to work with you on my directed study. Or possibly instruct via email or chat? I am willing to pay for assistance or whatever is needed.

    If the answer is no, I truly understand. Hope to hear back from you!

    My family is from Ecuador! i will be in south america in january!

    thank you for you time!

  26. noname2605 Says:

    Hello Erick!
    I’m a student who study in Viet Nam.
    I’m very interested in the source of ‘playing boxes’.I’m very grateful if you send it to me.Thank you very much.
    My email:hongphuong260588@gmail.com

  27. John Says:

    Hi!
    Love your work, we´re trying to do similar things out here in Spain. Are you sharing your source code? If so I´d love to take a look at it.

    -John

  28. Choi Says:

    Hi! thanks for sharing your nice work.
    I am just wondering if you could share your source for study. Thanks a lot :)

  29. Choi Says:

    Especially for the Playing boxes (with sound) and Playing keyboard (with sound)

  30. Broderick Murray Says:

    You have to express more your opinion to attract more readers, because just a video or plain text without any personal approach is not that valuable. But it is just form my point of view

  31. DieriJaxreich Says:

    Masz juz formula na wakacje? Jesli nie to polecam wakacje w mielno

  32. Prabhu kumar Says:

    Cool stuufs!!! Pretty interesting…
    I am a communication student from India.
    Can you send me the source codes for “playing keyboard” and “playing boxes” ???

  33. Too Skinny? How to Gain Weight For Girls Says:

    Too Skinny? How to Gain Weight For Girls…

    The media these days is so focused on how fat everyone’s getting that nobody considers those who feel themselves too skinny. People generally don’t have sympathy for someone who wants to gain weight. They often say they wish they had a body like th…

  34. shiowa Says:

    WOw amazing …good project
    i wan’t .FLA FILe Playing keyboard (with sound)…Please

    to shiowa@gmail.com
    thank you

  35. andrew Says:

    hi, could you post or send me the color detection fla.
    I have a school project that require color detection….
    yet keep failing with all the tutorials,
    please…

  36. stingy Says:

    you are stingy

  37. celebrity fuck you Says:

    Sign: zdbrw Hello!!! xybua and 4657gsccffrsmz and 5293 : I like your blog. cool post!

  38. Bülent KANDEMİR Says:

    Hi Erick
    I am a masters student working on my thesis project.
    I’m from Turkey.
    I’m sorry but can you send me the source of ‘Simple detection’?
    thank you very much

    kandemir28@gmail.com
    bulentkandemir@mynet.com

  39. lee Says:

    hai,
    your stuffs are cool..
    can you please teach me how to do the piano?
    even if you dnt wish to let me know the source code..
    please contact me..at least let me have a chance to talk with you..^^
    thx..
    regard,
    lee

  40. robot menager Says:

    Compassionate for the huge retrieve, but I’m really romantic the new Zune, and expectation this, as compartment as the fantabulous reviews several another people eff typewritten, module aid you decide if it’s the paw superior for you.

  41. Quinn Hutzel Says:

    Hey brah! Really enjoyed that article http://www.testthisblogtoseeifitworks.com/ . Keep me informed if you write any more.

  42. Leigh Bodden Super Bowl Jersey Says:

    Very efficiently written write-up. It will be helpful to anybody who employess it, including me. Keep up the great work ??¡§?C can???¨º?¨¨r wait to read more posts.

  43. bet at home srbija Says:

    I’m sure that i will come back to your blog. Well written articles !

  44. 1989_marie Says:

    hi Erick,

    can you please send me your source codes. I would really need to refer to examples of the motion tracking as ,i am doing a project which requires me to do motion tracking, and i am using papervision 3d and AS codes but i just need to move the dae object around using motion tracking.

    could you please send em the codes at marieyi.tan [at] gmail [dot] com

    thanks

  45. Wendell Gruenhagen Says:

    Hi there, You have done a fantastic job. I will definitely digg it and personally suggest to my friends. I am sure they will be benefited from this site.

  46. Consuela Sebastiano Says:

    Thanks for the post. My spouse and i have constantly seen that many people are needing to lose weight as they wish to appear slim and also attractive. On the other hand, they do not continually realize that there are more benefits to losing weight in addition. Doctors claim that over weight people have problems with a variety of disorders that can be directly attributed to their particular excess weight. The great news is that people who sadly are overweight and also suffering from different diseases can help to eliminate the severity of their own illnesses by means of losing weight. It is easy to see a gradual but marked improvement with health as soon as even a moderate amount of weight-loss is obtained gywl512.

  47. STELLA LOCKEBY Says:

    Very good things. Thank you.

  48. Dr. Homework Says:

    F*ckin’ remarkable issues here. I am very happy to look your post. Thanks so much and i am looking ahead to contact you. Will you kindly drop me a e-mail?

  49. Propecia Prostata Says:

    A home away from home. (Any temporary place where one feels comfortable).

  50. Sit-On-Top Says:

    Very nice blog post. I just stumbled upon your blog and wanted to say that I have truly enjoyed surfing around your blog site blogposts. In any case I will be subscribing to your rss feed and I hope you write again soon!

  51. hallelujah chords Says:

    Hi! I’ve been following your site for a long time now and finally got the courage to go ahead and give you a shout out from Lubbock Tx! Just wanted to tell you keep up the excellent work!

  52. casinolistingsguide Says:

    I am really enjoying the theme/design of your site. Do you ever run into any internet browser compatibility problems? A handful of my blog readers have complained about my website not operating correctly in Explorer but looks great in Safari. Do you have any solutions to help fix this issue?

  53. 234slotcasino Says:

    Hey! I know this is kind of off topic but I was wondering which blog platform are you using for this site? I’m getting fed up of Wordpress because I’ve had issues with hackers and I’m looking at alternatives for another platform. I would be fantastic if you could point me in the direction of a good platform.

  54. Melani1969 Says:

    Hallo, Ich habe Ihr Blog über Google bei der Suche nach Erster Hilfe für einen Herzinfarkt und Ihre Post sieht sehr interessant für mich.

  55. Yumiko Says:

    Can i get a tutorial with this?

  56. moro kabin Says:

    cool than you!

  57. Lucien Weuve Says:

    use of data. CMS can be purchased at this point in most styles and

  58. Life Insurance Quote Says:

    Get Life Insurance quote, auto insurance quote

  59. Les Miserables Tickets Says:

    You have done really nice job. There are many people searching about that now they will find enough sources by your tips.

  60. submit your sitemap Says:

    I am submit your sitemap and I intended to create you this very small note so as to say thank you once again relating to the wonderful strategies you have shown in this article. It has been really particularly generous of you to convey freely what exactly numerous people could have advertised for an ebook in making some profit for themselves, chiefly seeing that you might have tried it if you ever wanted.Those creative ideas also served to be a fantastic way to fully grasp most people have the same dream just like my personal own to figure out very much more in terms of this problem. I know there are a lot more pleasurable occasions ahead for individuals who scan through your blog.

  61. things to do in phuket Says:

    I together with my guys have been reviewing the best tips on the blog then at once got a terrible feeling I had not thanked you for those secrets. Those young men had been as a consequence joyful to study them and have now undoubtedly been loving these things. We appreciate you simply being considerably accommodating and for pick out this kind of fantastic information most people are really eager to understand about. Our own honest regret for not expressing gratitude to you earlier.

  62. Jersey Savings Says:

    I am glad to found such useful post. I really increased my knowledge after read your post which will be beneficial for me.

  63. voluntary sector courses Says:

    Your post is really good and informative. thanks for sharing the great ideas.

  64. autovermietung suedafrika Says:

    Hey There. I found your blog using msn. This is a very well written article. I’ll make sure to bookmark it and return to read more of your useful info. Thanks for the post. I’ll certainly comeback.

  65. Nellie Brydon Says:

    12. Hello There. I found your blog using msn. This is a really well written article. I’ll be sure to bookmark it and return to read more of your useful info. Thanks for the post. I’ll certainly comeback.

  66. kredyt mieszkaniowy oprocentowanie Says:

    I enjoy what you guys tend to be up too. This kind of clever work and coverage! Keep up the terrific works guys I’ve added you guys to blogroll.

  67. Dentist Salaries Says:

    Thank you for the really interesting article on dental practice management. Other thing is that dental are generally attributable toineffective preventative care. It really is commonly noticed among workers in the lower and middle classes. It is caused by genetics plays a crucial role, and some individuals are more vulnerable towards the risk of in comparison with others dentists in the field of cosmetic dentistry.

  68. Dental Practice Management Says:

    Thank you for the really useful article on dental practice management. Other thing is that dental health issues are generally the result ofineffective preventative care. It really is commonly found among workers in the lower and middle classes. It is caused by your age plays an important role, and some people are more vulnerable to the risk of than others dentists in the field of cosmetic dentistry.

  69. Florentino Blackman Says:

    Normally I do not learn article on blogs, however I wish to say that this write-up very forced me to check out and do so! Your writing style has been surprised me. Thanks, quite great post.

  70. Carlos Gulikers Says:

    Thanks for your write-up. I also feel that laptop computers have become more and more popular these days, and now are usually the only type of computer found in a household. It is because at the same time that they are becoming more and more inexpensive, their processing power keeps growing to the point where they’re as potent as desktop through just a few years ago.

  71. Lindsay Karlson Says:

    Thanks for accommodation Malaga revealing your ideas. Another thing is that college students have a solution between federal student loan and also a private student loan where it’s easier to go with student loan consolidation than through the federal student loan.

  72. Bradley Dody Says:

    Undeniably believe that which you stated. Your favorite reason seemed to be on the web the simplest thing to be aware of. I say to you, I certainly get irked while people consider worries that they just don’t know about. You managed to hit the nail upon the top and defined out the whole thing without having side-effects , people can take a signal. Will likely be back to get more. Thanks

  73. Intercom systems for home Says:

    It’s unusual for us to discover something in the WWW which is actually as enjoyable and exciting as what you’ve got there! Your website is actually sweet, your graphics are fantastic, and what’s much more, you work with reference which are generally suitable to what you’re stating. You’re definitely a person in a zillion, marvelous job.

  74. Cisco Says:

    I visit your blog again and again gladly madly written and always the suitable info.

  75. cheap uggs uk Says:

    Hi i’d personally love to subscribe and study your websites posts ;

  76. MacBook Air ohne Schufa Says:

    Zune and iPod: Most people compare the Zune to the Touch, but after seeing how slim and surprisingly small and light it is, I consider it to be a rather unique hybrid that combines qualities of both the Touch and the Nano. It’s very colorful and lovely OLED screen is slightly smaller than the touch screen, but the player itself feels quite a bit smaller and lighter. It weighs about 2/3 as much, and is noticeably smaller in width and height, while being just a hair thicker.

  77. Hamilton Beach 54615 Wavestation Express Dispensing Blender with 48-Ounce Jar, Black Says:

    Hi! This is my first visit to your blog! We are a group of volunteers and starting a new initiative in a community in the same niche. Your blog provided us useful information to work on. You have done a extraordinary job! Also, please visit my site http://www.facebook.com/notes/blender-deals-online/remanufactured-breville-xx800blxl-die-cast-hemisphere-2-speed-blender-with-67-ou/141551702620685

  78. scan for missing dll files Says:

    Thanks for the advises, hope it will got my driver error fixed.

  79. Alejandro Mckelvin Says:

    Celebrity news: Homey-O & Juliet the movie is an Upcoming movie release starring actor Tom Truong

  80. New Country Music Says:

    Title…

    My Rcommended Blog Post…

  81. save my marriage Says:

    http://webgaul.tk/joomla-mambo.html

  82. dirty shit on your face Says:

    http://www.niggershitonyourface.com

  83. Jay Bonino Says:

    Some truly interesting points you have written. Aided me a lot, just what I was searching for : D.

  84. Latarsha Carbajal Says:

    I was suggested this blog by my cousin. I’m not positive whether or not this publish is written by way of him as no one else recognise such detailed about my difficulty. You are amazing! Thanks!

  85. how to carve fruit into flowers Says:

    I have read a handful of pages from your blog, but the nav will not seem to line up with the rest of the webpage properly which inturn makes clicking the links problematic. Want me to mail you a screengrab?

  86. buy nursing scrubs coupon Says:

    I really dig your site design, did you do this all by yourself or hire a freelancer to do it?

  87. loafing shed plans Says:

    Hi this is fairly of off topic although I was wondering in the event blogs use WYSIWYG editors or if you need to manually code with HTML. I’m starting a blog soon but have no coding knowledge so I want to to get guidance from someone with experience. Any help would possibly be greatly appreciated!

  88. ochronna Says:

    I like the helpful info you provide in your articles. I’ll bookmark your blog and check again here regularly. I’m quite sure I will learn lots of new stuff right here! Good luck for the next!

  89. louis vuitton on sale Says:

    Theres choice is about choices, so finding the perfect for your children is absolutely not an issue anymore.

  90. Objeluldere Says:

    [url=http://affmobile.WebStarts.com]adultfriendfinder mobile[/url] adultfriendfinder malaysia

Leave a Reply