Dragging multiple display objects

With touch-enabled screens, the act of dragging a display object with a finger is very intuitive. Adobe AIR provides API calls that allow this type of interaction without much effort. In addition, the multi-touch capabilities of iOS can be harnessed to allow multiple objects to be dragged at once.

We will continue where we left off in the Detecting multiple touch points recipe and add the ability to drag the bubbles around the screen.

Getting ready

If you haven't already done so, complete the Detecting multiple touch points recipe before proceeding.

You can continue to work with the code you wrote during that recipe. Alternatively, from the book's accompanying code bundle, open chapter5\recipe3\recipe.fla into Flash ...

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.