Home  >  

Multi-touch and the Flash Platform

Author photo
October 13, 2009 | | Comments (7)
AddThis Social Bookmark Button

One of the big announcements at MAX this year was Flash on devices. As the capabilities of devices change, so do the capabilities of the platforms we use to build our applications. One of the latest trends is Multi-touch. In this post, I'll try to shed some light on the upcoming multitouch capabilities in AIR 2.0 and Flash Player 10.1.

First of all, the dependencies... Not every device is equal, and not all devices will support multi-touch capabilities. Here's what you need to use Multi-touch with Flash

1) Touch capable hardware

Touch screen device or
mobile device or
multi-touch capable touch pad

2) An operating system that supports touch events

Windows 7 or
OSX 10.5 (for touch pad multi-touch) or
Mobile OS (Android, Windows Mobile, Palm WebOS, etc...)

3) Flash player 10.1 or AIR 2.0

It's also important to understand that the number of touch points available also depends on the hardware. Some HP Touchsmart machines can support 2 touch inputs, while others support 4. Mobile devices might support a different number of touch points, and there are rumored R&D devices that can handle scores of touch points. Additionally, other devices that consume your application may not support multi-touch at all, so you should be aware and ensure that your application degrades gracefully to single-touch interaction.

Most people think that multi-touch input means you are touching the screen directly. However, that is not necessarily the case. The multi-touch APIs coming in AIR 2.0 and Flash Player 10.1 supports both indirect and direct multi-touch, and are identical in how you access the touch events.

Direct multi-touch is the common perception, where you are directly touching the screen where the events take place. Indirect touch is when your application receives multiple touch events from an input device that is not the screen. For example, a touch pad that is capable of multiple touch points.

In both direct and indirect multi-touch usage, the API is identical. There are 2 input modes for multi-touch events. "Gesture" and "Touch"

In gesture mode, you use predefined multi touch gesture events to add gestural behaviors to your application components. In this mode, the gestures are finite, and cannot be combined, however it is very easy to add gestural capability to any component.

In touch mode, you receive the individual low-level touch events that resemble mouse events. In this mode, you can analyze all of the touch events individually, and can create custom gestures/behaviors or custom logic based on each individual touch point.

Gesture and touch mode are mutually exclusive. You cannot receive gesture events when in touch mode, and cannot receive touch events in gesture mode. Currently, the default setting when an application loads is "gesture" mode,. however you can switch back and forth between these modes at any time.

In either gesture or touch mode, handling touch events is easy. You just need to add event listeners and event handler functions. It really is as easy as using a mouse event handler. The difference is just that you can have multiple touch inputs, instead of a single mouse input.

For detail about the multi-touch calendar demo from the MAX Day-1 keynote and specific code examples from my MAX session on multi-touch development, check out my Cynergy blog online at:
http://cynergysystems.com/blogs/page/andrewtrice?entry=max_recap_multi_touch_development

There, you will find basic examples for both touch and gesture events, as well as application of these multi-touch events to create real world applications.

___________________________________
Andrew Trice
Principal Architect
Cynergy Systems
http://www.cynergysystems.com

Read more from Andrew Trice. Andrew Trice's Atom feed

Comments

7 Comments

Jerry Barnwell said:

It's all about Silverlight, really. I want next-generation RIA.

Jerry Barnwell said:

[Apologies, I posted that last comment on the train from my iPhone and it looked like it hadn't submitted!]

Why all the excitement about multi-touch support in future versions of Flash, which is as yet untried and untested?

The current version of Silverlight already has full multi-touch support:-

http://timheuer.com/blog/archive/2009/07/30/silverlight-3-multi-touch-introduction-fundamentals-basics.aspx

This web site calls its self "Inside RIA". But really the focus here is very much more narrow than the name implies, isn't it?

This web site is really all about Flash. All the top headlines are about Flash. About 99% of the articles are about Flash. I stopped counting at 30 references to Flash on the homepage. (There are two references to Silverlight.)

Personally, as a true RIA developer, I use both Flash and Silverlight, along with many other client and server technologies, including RIA Services (yes that's from Microsoft).

Andrew Trice said:

Jerry,
Multi-touch support in Silverlight is just as untested as multi-touch support in Flash. It relies on Windows 7 and multi-touch hardware. The hardware is not widely adopted yet, and Windows 7 has not been publicly released, although it is available through MSDN. There is no broad adoption of multi touch on any platform, which is why any annoucement of multi touch is big news (regardless of Adobe vs Microsoft). The Flash platform also aims to deliver cross platform and cross-device multi touch support, not specifically the Microsoft stack.

As far as Flash vs Silverlight content... I do not officially represent O'Reilly, but I believe that the goal of the site is to provide as broad of a range of knowledge as possible, focusing on many technology stacks. However, there do not seem to be as many willing Silverlight contributors. To my knowledge, O'Reilly and InsideRIA are always looking for willing and skilled authors. If you would like to contribute and even things out, I'm sure they would love to hear about it.

Thanks,
Andrew Trice

Zarate said:

Any specific reason why Linux is not supported?

Andrew Trice said:

No idea... I don't believe that Adobe has released a full list of supported hardware or software. If linux distros support mulit touch, they will likely be supported as well. Adobe would have to give the final answer on this.

Tim Acheson said:

Andrew, yes, I definitely do appreciate what you're saying there.

However, I welcome the fantastic multi-touch support for RIA apps which we have right now thanks to Silverlight.

I do find it strange on a web site called "Inside RIA" to find long articles raving about multi-touch in Flash which doesn't exist yet, yet no mention of multi-touch in Silverlight which is here for us all to use right now

Multi-touch on Windows 7 is better than no multi-touch at all. It's a step in the right direction. At this point in time only a miniscule proportion of web users have hardware capable of multi-touch.

As for multi-touch support in Flash, I try not to "count my chickens" until they've hatched. When this was announced by Kevin Lynch earlied in the year, people still recalled him standing up at MAX 2008 and making it sound like Flash support on the iPhone was imminent.

When Adobe makes an announcement about Flash it can provide a great PR opportunity, creating big headlines and a buzz that spreads far and wide -- but Adobe don't necessarily deliver.

krogers said:

A lot of QQ going on here. Silverlight has a lot of growing up to do before it can be as easily leveraged for RIA work as Actionscript applications.

Nobody has to talk about what you want. How about you jsut go to a site talking about SL multi touch instead of telling people that run this site what they should be doing.

What a baby you are Jerry.

Leave a comment


Tag Cloud

iPad

What's your take on the iPad? (Putting aside the Flash/iPad flame war)

Answer

Latest Features

Recommended for You

@InsideRIA on Twitter

Archives

  • Or, visit our complete archive.  

About This Site

Welcome to the premiere community site for all things RIA sponsored by O'Reilly Media and Adobe Systems Incorporated.