Flash AS3: Apply bitmap filters to a webcam image

Simple (beginner-intermediate) Flash Actionscript 3.0 code example on how to apply a bitmap filter on a webcam image. Also image rotation and simple motion detection (activityLevel) is included.

Simple (beginner-intermediate) Flash AS3code example on how to apply a bitmap filter on a webcam image. Also image rotation and simple motion detection (activityLevel) is included.

You can make a Photobooth of this script as well. Mark Knol wrote an ImageSaver class that sends a .jpg or .png picture of a Display element to a simple PHP script that stores it on a webserver :
Stroep.nl AS3 ImageSaver Class.

You need a webcam and give Flashplayer access to the camera to see the example below :

[kml_flashembed publishmethod=”static” fversion=”8.0.0″ useexpressinstall=”true” movie=”http://media.kasperkamperman.com/2010/03/camera-example.swf” width=”400″ height=”300″ targetclass=”flashmovie”]

Get Adobe Flash player

[/kml_flashembed]

For more in-depth information see the following subjects in the Flash Actionscript 3.0 reference :

The code ( copy-paste directly in a new Flash project in the Actions – Frame. )

  • Hi, very good example. Thanks.

  • Great example…thank you so much..