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

Creating a basic document class


Although you can write ActionScript 3.0 code directly onto the timeline, it isn't a recommended practice. Instead you really should apply a more object-oriented approach and develop your own custom classes. This is of particular importance on large-scale projects.

Most ActionScript developers should already be comfortable creating classes but we will cover the steps here for the avoidance of doubt. Specifically, this recipe will have you create a basic document class that can be applied to the example app you started in the previous chapter.

Getting ready

We will be working from the latest version of bubbles.fla from Chapter 2. Alternatively, you can open chapter3\recipe1\bubbles.fla from the book's accompanying code bundle.

How to do it...

Follow the steps to create a document class:

  1. First ensure that no instances on your stage are currently selected. Then, from the PUBLISH section within the Properties panel, click on the pencil icon next to the Class field.

    The...