Book Image

Flash iOS Apps Cookbook

By : Christopher Caleb
Book Image

Flash iOS Apps Cookbook

By: Christopher Caleb

Overview of this book

The latest version of Flash Professional can directly target iOS, allowing Flash developers to write applications that will run natively on Apple's iPhone, iPad, and iPod touch. What's more, with Apple loosening its restrictions on third-party technologies, apps written in Flash can now be sold and distributed within the App Store.Flash iOS Apps Cookbook provides the recipes required to build native iOS apps using your existing knowledge of the Flash platform. Whether you want to create something new or simply convert an existing Flash project, the relevant steps and techniques will be covered, helping you achieve your goal.Learn how to configure and use Flash Professional for iOS development by writing and deploying a simple app to a device. Implement many iOS-specific features such a multi-touch, the virtual keyboard, camera support, screen orientation and the Retina display. Overcome the limitations of mobile development by mastering hardware acceleration and optimization. Whether you're an enthusiast or professional developer, the Flash iOS Apps Cookbook is your toolkit to creating high-quality content for iPhone, iPad and iPod touch.
Table of Contents (21 chapters)
Flash iOS Apps Cookbook
Credits
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface
Index

Working with the built-in cameras


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.

Getting ready

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.

How to do it...

Follow...