AirBooth
Adobe AIR application by Irfan Pirbhai

AirBooth is a straightforward application that allows users to capture a snapshot from their webcam, and save it onto their desktop in .png format.

This application uses Adobe Air 1.0 and was made using Flash CS3 and ActionScript 3.0.

The application was made by first initializing a webcam using the .getCamera method of the Camera class, and attaching that webcam to a video object using the .attachCamera method of the Video class. A mouse event listener was then added to the stage, which, upon detecting a mouseclick, draws the video image to a BitmapData object, encodes it to a .PNG file, saves it in a ByteArray object, and then writes it to the user's Desktop using the classes from the Adobe AIR FileStream package.

The following AIR Classes were used:

File (flash.filesystem.File)

A File object represents a path to a file or directory.


FilesStream
(flash.filesystem.FileStream) A FileStream object is used to read and write files.

FileMode
(flash.filesystem.FileMode) The FileMode class defines string constants used in the fileMode parameter of the open() and openAsync() methods of the FileStream class.

Also, this application makes use of the AS3corelib Library (available for download at http://code.google.com/p/as3corelib/), specifically:


PNGEncoder
(com.adobe.images.PNGEncoder) The PNGEncoder class converts BitmapData into a valid PNG