Configurable panning with virtual keyboard activation

The virtual keyboard appears automatically when a user touches an input text field. If the text field sits within the region used by the keyboard, then the stage will automatically pan to prevent the text field from being obscured. However, it is possible to switch off this default behavior and modify the layout yourself in response to the keyboard being activated.

The steps covered here are applicable only to those using Flash Professional CS5.5 and AIR 2.6 or above.

Getting ready

An FLA has been provided as a starting point.

From the book's accompanying code bundle, open chapter7\recipe5\recipe.fla into Flash Professional.

Centered on the stage is an input text field named field. We will write ...

Get Flash iOS Apps Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.