Detecting multiple touch points

The term multi-touch refers to the ability to simultaneously detect and track two or more distinct points of contact on a touch-screen. Touch events are similar to the mouse events provided by Flash, except you can listen for and respond to multiple touch events all at once.

Let us revisit the Bubbles app from Chapter 3 and add multi-touch interaction to it. We will add functionality to let the user trap multiple bubbles by holding a finger on top of each.

Getting ready

A version of the Bubbles FLA has been provided for you to work from.

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

How to do it...

We will be making changes to both the FLA's document class and ...

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

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.