While launching and using the default camera app provides the user with the native camera experience that they are familiar with, it may not be appropriate for all types of applications. In addition to CameraUI
, AIR also provides the Camera
class, which receives the video data captured by the device's on-board camera, allowing it to be directly displayed within your app.
In this recipe, you will learn how to receive a video stream from the camera and display it within your app using Flash Professional CS5.5. The Camera
class is not supported by Flash CS5 and AIR 2.0 for iOS.
You will need a device that features a camera. The fourth generation iPod touch, iPad 2, and all models of iPhone have cameras.
From the book's accompanying code bundle, open chapter10\recipe4\recipe.fla
into Flash Professional CS5.5.
A landscape aspect ratio has been set for the stage and this has also been reflected within the FLA's AIR for iOS settings.