I just finished uploading a new tutorial explaining how to create applications that respond to multi-touch gestures like zoom and rotate. This example creates an Adobe AIR 2.0 application as it is currently the only solution that will work cross-platform. I show the application running on both a MacBook Pro and an HP TouchSmart computer. [...]
As you can tell I have been having tons of fun lately playing with the new multi-touch and gesture APIs in Flash Player 10.1 and AIR 2.0. Based on my videos and examples there have been a ton of questions that have come up, many of which I didn’t know the answers to. There are still many things to test and I will pick Danny Dura’s brain while we are sunning ourselves this week in Brasil. Danny has done a lot of work with these APIs and will be doing a session on them at Flash Camp Brasil. Below are some answers to the most asked questions that have come up.
How many touch points can the Flash Player respond to?
There is no limit to the number of touch points you can have. You are only limited by the number of touch points the device you are using has. The HP TouchSmart has a maximum of two touch points and the iPhone has five. All depends on the device you are touching.
The gestures are nice but what about the raw touch data?
The examples I showed used the built-in gestures that we provide. These will be good for most applications. But there is also a raw multi-touch API as well that lets you track the raw point data.
Can I create my own custom gestures?
Absolutely you can. You would listen for the raw touch events rather than the high level gestures. You can track this raw data until you determine the custom gesture has happened and then fire your own event.
Does every device support all of the gestures in Flash Player 10.1?
Nope. Again you are at the mercy of whatever device you are using. We do have an API that allows you to find out which are supported on the device at runtime so you can do something else. Christian Cantrell has a great article on the developer center that lists which devices support what. This article also has some nice code snippets too.
Does the multi-touch stuff work in the browser too?
All of the multi-touch and gesture APIs work in the browser on Windows but do not work in the browser on the Mac. I don’t have any idea about Linux but I will try to find that out.
Why don’t they work in the browser on the Mac?
I anticipated this one of course. Jakub Plichta, who is the Flash Player engineer responsible for multi-touch, sent me the following detailed information about what we need from Apple to make it happen. Both Firefox and Safari use the same API to interface with the plugin. What we need is for Apple to add gesture and raw touch data to the NPCocoaEvent class defined in npapi.h in the webkit framework. There is nothing we can do until this happens. Big thanks to Jakub for giving us the nitty gritty details.
Wait but WebKit is open source. Can’t you do this yourself?
You really won’t leave this alone will you? WebKit is open source but the plugin interfaces for Safari and Firefox are written by Apple.
Will multi-touch work in the HTML component in an Adobe AIR 2.0 application?
In this case we have control over the WebKit implementation but because of time constraints we won’t be able to include that in the initial launch of AIR 2.0. But since it works perfectly with Flash-based AIR content I don’t think it will cause too many issues.
Do these APIs work on the iPhone when publishing from Flash CS5?
I’m assuming you saw my last post with the video but just in case, I thought I would put the question here. Yes they work on the iPhone too.
I have Windows 7 but no touch monitor. Can I use a Wacom Bamboo to do the multi-touch stuff?
Unfortunately not. Wacom has there own driver which doesn’t generate true native gestures. If you bought one I hope you saved your receipt . The general rule is: if the device generates raw, native multi-touch events then they will work in Flash.
E-Readers, 3D TV and internet connected TVs, Blu-Ray players and set-top boxes. That pretty much sums up CES 2010.
I have a Kindle and I absolutely love it. But I love it because it is so easy to use and even easier to buy books straight from the device. The same goes for the Nook which [...]
I came across this video on Ubergizmo and I wish this was real today…! The video demonstrates a multi-touch tablet to read magazines in full color with video, audio and online capabilities. The video is created by The Wonder Factory and other than that, there really isn’t any more information out there. While it’s only [...]
One of the popular features in the prerelease versions of Flash Player 10.1 and AIR 2 is the multi-touch capability. If you haven’t seen it, you should check out this video of Kevin Lynch showing a couple of innovative examples using the multi-touch and “gestures” capabilities on the HP TouchSmart during the keynote at the MAX developer conference last month. We hope you will be able to explore and innovate using the new features in Flash Player 10.1 and AIR 2. See what you can do with them.