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

Setting the default aspect ratio


Devices, such as the iPhone, can be freely rotated in real space. This is convenient as it provides two aspect ratios that can be worked with—portrait and landscape.

Let us see how to select a default aspect ratio.

Getting ready

Using Flash Professional, open chapter8\recipe4\recipe.fla from the book's accompanying code bundle.

The library contains a bitmap image of a fire truck that has been designed for a landscape resolution of 480x320 pixels.

How to do it...

We will begin by locking the FLA to a landscape aspect ratio:

  1. Using the Selection Tool (V), click anywhere on the stage. From the Properties panel, change the stage's aspect ratio from portrait to landscape. To do this, simply set its width to 480 and the height to 320.

  2. Although the stage size implies it, the AIR for iOS settings also need to be changed to reflect our choice of aspect ratio. Select File | AIR for iOS Settings from the drop-down menu.

  3. Ensure the General tab is selected.

  4. Select Landscape from...