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

Handling a swipe gesture


The introduction of touch-screens has made the process of moving between pages of information more natural. The iPhone made simple touch gestures, such as swiping, popular. For example, many photo viewer applications allow the user to quickly flick their finger across the screen in order to view the next image in a sequence.

The TransformGestureEvent.GESTURE_SWIPE event is available, allowing both vertical and horizontal swiping gestures to be detected and acted upon.

Let us see how this is done.

Getting ready

From Flash Professional, open chapter5\recipe6\recipe.fla from the book's accompanying code bundle.

Sitting on the stage is a container movie clip named content, which is over twice the width of the stage. Inside the container are two distinct bubbles, with only a single bubble able to fit on screen at any one time. We will write code to let the user swipe horizontally between the two bubbles.

How to do it...

Perform the following steps to listen for and respond...