We are saying goodbye to ActiveDen on February 29. Please make sure you download any ActiveDen items before then! Read more.

WebCam Basics

WebCam Basics

There are lots of wonderful things you can do with a webcam, but before you can even do something as simple as using Flash’s built-in motion detection functions to trigger actions when something moves in front of the camera you have to learn how to make Flash talk to the webcam and start pulling a video stream from it, and how to differentiate between a USB webcam and any other video capture devices than are detected on the system.

This file demonstrates how to:

  • get the names of all video devices installed on the system.
  • automatically initialize a USB Video Class webcam in preference to a TV Tuner or other device.
  • set up a menu of all available devices for the user manually to select from.
  • set your camera to deliver video at various resolutions.

The user interface is a right-click menu on the video window so you also learn:

  • how to modify Flash’s default main context menu, including:
  • remove some of the default menu options.
  • add new single items to the context menu (the available video stream resolutions)
  • dynamically create a list of available devices (adding to the menu as they are detected)

All the “help” is contained in detailed comments in the compact code ( Check the 1kb file size :) )

This file is written in Actionscript2 on CS3 and published as a Flash 8 fla.

I have an Actionscript 3 class version ready with all the functioality except the contex menu, which I will finish and make available for free to any buyers of this file who want it.

I will support all the advertised functionality, and for any buyers interested I will provide code samples and limited support towards the next step: basic motion-triggered actions, which I will announce here as I develop it.


Vector Graphics
\\ \\

\\ \\ \\

Video : Motion Graphics