So a little while ago, Halloween in fact, I threw together a demo of some face-detection stuff I’d been looking at. [Check out the original post here.] We originally had the demo on the MMT Digital homepage, but recently that’s been updated and my demo got lost in the process, so I’ve restored it here, along with the Flex project for it.
So, here it is: the live demo and underneath, a link to the source code for it.
The code itself I’m not going to try explaining, but it’s a hack of other demos that are out there on the web.

hi. I can’t see nothing in the example and flex project.
I check the configuration but still the same. can you help me?
@james – Can’t see anything as in camera feed? If you’re on a Mac it might be that this example has out-of-date camera detection – Macs tend to get confused with cameras in Flash, and the code might be only picking the first camera in the available cameras list.
I shall try getting the code on GitHub and seeing if there’s a fix to be made…
hi
thanks for your attention, but my operating system is Windows 7. The strangest thing is that I does not like in your site, but if it works to a friend.
@james – Not sure what’s up there then!
can this marilena work with XML data? How?
Hi. I would like to use your code for make a change with the mask, but I don´t know how to open the file….which is the program I have to get to modify your project??? I use Flash Cs 5 but I think it isnt the correct program
The project is originally a Flex Builder project file (now Flash Builder). You should be able to extract the contents from Zip format to access the code, however.
Thaks a lot!
But when I import the project the program show me thsi message “Application “src/WebcamFaceDetector.as” does not exist. It might have been deleted.” what does it means. Is it incomplete the project???
Pleeeease help I need to run that project
Finally I can edit the MASK but now I have another doubt. How can I put an kind of ANIMATED MASK like a GIF. I already made tests with gifts but it only appears the first image. not the secuence.
Unfortunately, the default Flash components only support non-animated GIF images, which is why it isn’t playing. You could replace the Image class with ByteArray.org’s AS3GIF class (http://code.google.com/p/as3gif/) however, which does add support for animated images.
Could you make the change please? and send me or post the modify project? Pleeease.
If you want, I could pay for the work…
Apology for the inconvenience = )
@James, I’m wondering whether it’s possible to detect multi-face with your facial recognition function?
@James, I’m wondering whether it’s possible to detect multi-face with your facial recognition function?
@Louis It’s definitely possible – it might even be supported at the moment, or it’s easy to add. Certainly some of the early prototypes had that functionality in there as standard – you just have to tweak the code that evaluates face matches and face dimensions, when you’re working with a wider camera angle.
Hi James,
This may seem like a far stretch, but would you know how to start/stop music based on facial detection?