O'Reilly logo

ActionScript 3.0 Bible by Roger Braunstein

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 23. Multitouch and Accelerometer Input

FEATURED CLASSES

  • flash.ui.Multitouch

  • flash.events.TouchEvent

  • flash.events.GestureEvent

  • flash.sensors.Accelerometer

  • flash.events.AccelerometerEvent

Due to the efforts of the Open Screen Project (http://openscreenproject.org), Flash Player is appearing on a growing number of smartphones. Simultaneously, consumers, desktop and laptop manufacturers, and makers of desktop operating systems are embracing touchscreens. The net effect is that Flash Player has access to a wider array of input than ever before. The user is no longer limited to a keyboard and mouse. In fact, she may not even have a keyboard or mouse installed, although chances are in that case that a software keyboard is provided and touch input can be interpreted as mouse input.

In this chapter you'll learn how to deal with not just touch-based input, but information from various sensors Flash Player may have access to, including accelerometers, and geolocation sensors such as GPS. I'll mention it, but I won't go into depth on geolocation because it's currently available only to AIR or native apps. Between the keyboard and mouse (Chapter 21, "Interactivity with the Mouse and Keyboard"), the camera and microphone (Chapter 33, "Capturing Sound and Video"), and touch and accelerometer (this chapter), modern hardware has a surprisingly extensive repertoire of interaction modes.

Planning for Your Audience

Consider three platforms you can find Flash Player on: a phone with a 320 × 480 pixel ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required