Flash Player 10.1 multi-touch FAQ

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.

Lee


Commentary

  1. Matthew Fabb says:

    Thanks, Lee! That detailed info about the Mac & multitouch is just great. As this is the type of thing that comes up when talking to clients or bosses and they want to know exactly why. Having that little nugget of info is extremely helpful when this comes up.

    Now if you could just get a couple of lines like that about Mac lacking API for hardware accelerated video in Flash Player 10.1, that would also be really helpful.

  2. Bergman says:

    Great, i love these kind of post ^^’

    but now, i need flash CS5 for my asus t91mt :(

  3. But will Flash 10.1 support multitouch!? Come on Lee! Stop avoiding the question (jk)

  4. danno watts says:

    when will we be able to download the flash cs5 beta? i really need some fixes for the font and text issues that cs4 for mac has.

    thanks!

    rocksteady,
    danno~

  5. George Popov says:

    You wrote that multi-touch is not working in the browser on Mac, but only mentioned Firefox and Safari. What about IE for Mac or Google Chrome (which uses WebKit again)? Are there any problems with these browsers and what exactly are they?

  6. maliboo says:

    Thumbs down for Wacom ;(

  7. erick says:

    but what about listening “raw” TouchEvents in Air 2 App with MacBookPro Trackpad on MacOS 10.6 ? For now only TransformGesture are available.

  8. Tann San says:

    I emailed Wacom to see if they plan on changing the driver anytime soon, no reply yet. I really want one of those touch tablets. I didn’t even know they’d released a new Bamboo. Their old one is still my favourite tablet. I was looking into using Touchlib and some dodgy web cam based action but it would be so much nicer if wacom just updated their driver. I figured maybe they just didn’t realise it wouldn’t work.

  9. Bobby says:

    What about the Bamboo Tablet if running on Windows 7? Will the touch events work then?

  10. Sumit Arora says:

    Hi Lee,

    Good Post.
    I m little bit confused about the multi touch features of Flash and possibility of Flash Player running on Mobiles.

    Adobe is working on running Flash Player running on mobile is a vary good effort and Open Screen Project also.

    My Question is that if i make a flex application with flex controls and try to run it in Flash powered device how will it match the events in flex like selectedIndexChange etc.

    If not then i have to make it using Flash Player Multi touch is that so or will they support all flex native events. If yes how ?

  11. mlebrun says:

    hey lee,

    just curious but is there an api to let one iPhone connect to another iPhone/iPod touch?

    for instance to allow a multiplayer game, not web based?

  12. Clouds says:

    Yeah, how about low-level access to iPhone API? like accessing music/photos on the phone, or browsing the web? looking for wifi/3G signal and measure it? will they possible?

  13. regtweaker says:

    Good Post.keep coming

  14. filipe says:

    Hello… i have on question…

    If you use one multitouch pc screen you need TUIO connection?
    or the pc screen know the position the fingers without another technology?

    pc screen + air2 = application multitouch
    or
    pc screean + air2 + TUIO = application multitouch

    best regards

    or

  15. polyGeek says:

    Hey Lee, I’m about a week away from buying a new laptop that I can test my multi-touch apps on. I think I read somewhere that you have one of the HP TouchSmart tm2t series, correct? Would you give it a thumbs up or down?

  16. Tann San says:

    I finally got a reply from Wacom in regards to the Bamboo Touch. It’s left me somewhat confused as I assumed that a software change was all that was required but from the sound of it they imply that it would actually require a hardware revamp. I guess I’m sticking with my old-skool pen Bamboo for the mean time.

    —-Message from Wacom—-

    Actually we have no further information about future developments. As this was our first tablet with touch gestures, we need to wait for the feedback of the customers. If multitouch is required, the next Bamboo-generation could have it. As the actual series is on the market since half year there probably won’t be a hardwange change for a while.

  17. Brett says:

    It would be great if Adobe would publish a list of Air 2 multi-touch compatible devices. I guess I need to cancel my Bamboo Touch order.

  18. carrrramba says:

    is it possible to use the flash Player multi touch gestures API
    on a Microsoft Surface Computer?

    i couldn’t find an answer in the faq or the adobe tutorial.

    …hope someone knows :-) )

    cheers
    Stefan

  19. Daniel says:

    maybe bamboo touch and fp10.1 can work together on windows, with this driver http://code.google.com/p/bamboo-tuio/
    have not tested it yet.

    daniel

  1. [... 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 ...]

  2. [... 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 ...]

  3. Anonymous linked here

    [... 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 ...]

  4. [... 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 ...]

  5. [... 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 ...]

  6. [... 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 ...]

  7. [... 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 ...]

  8. [... 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 ...]

  9. [... 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 ...]

Leave a Comment