highest safe dose of levitralevitra takecompare levitra cialis viagrageneric levitra onlinecheap herbal vardenafillevitra online uklevitra increases sperm countwomen\s vardenafillevitra samplelevitra slide kitmail order levitralevitra prescription onlinesoft levitraPurchase Levitra pillthe buy levitrageneric levitra canadaproduct team levitravardenafil 90 pills Buylevitra sale 32free sample prescription for levitralevitra trial offermedication levitranon prescription vardenafillevitra online shop in uklevitra medicareinformation levitralevitra on line saleslevitra japanqry vardenafilSale vardenafil 20 pillscheap herbal levitraidentify vardenafillevitra alternative lavitraflomax levitraGeneric Levitra 20 mg Salelevitra couponus vardenafilbuy levitra 10mglevitra commercial modelsforum levitraOnline vardenafil Courier shipping10 mg vs 20 mg levitralevitra dosage directionstoo much levitrawhere to puchase vardenafil onlinecheap levitra on linecialis levitra vardenafilhow levitra workqueen levitravardenafil 180 pills orderlevitra beogradlevitra birth control pillslevitra orallow cost alternatives and vardenafilLevitra 120 pills BuyBuy vardenafil Free Airmail shippingordering levitra onlinecialis levitra viagra comparebuy vardenafil online australiaorder levitra cheap pricevardenafil saleanyone tried generic levitravardenafil softabsbuy levitra viagra onlinelevitra user reviewneed for increasing amounts of levitralevitra online purchasewhat is vardenafilvardenafil rrp australia costvardenafil fast shippingvardenafil no prescriptionlevitra online gamblingviva levitrawomen taking levitradiscount vardenafil onlinelevitra sampleslowest price levitra generic onlinelevitra penslevitra and flomaxpurchase levitra 60 pillslevitra side effectorder Levitra 10 mgalternative to levitraby levitra priceBuy vardenafil Courier shippinguk alternative vardenafillevitra sarasota floridaprice on levitralevitra or viagra which is betterlevitra from canadalevitra ad reviewtry levitra for freeacheter du levitrawholesale vardenafillevitra where to buycomparison levitra cialistoo much vardenafilcomparison of levitra and viagradosage for levitrageneric mexican levitrahow to buy levitragenuine vardenafilcialis levitra viagra which is bettervardenafil onlinerelative costs of cialis levitraget vardenafil drug onlinelevitra vs viagra vs cialisorder levitra 30 pillssample of vardenafildiscount cialis levitra online canadanatural equivelant ingredient in levitraorder levitravardenafil 20 pills onlinecialis vardenafilreviews of viagra cialis and levitraeuropean vardenafilcanada in levitraPurchase Generic vardenafil 20 mglevitra 100mglevitra propafenoneinfo levitrauk levitra saleswoman\s levitraOnline Levitra 120 pillspurchase vardenafil 10 mggeneric levitra tab 20mgvardenafil australiacompare viagra to levitravardenafil 6 free samplesvardenafil canadian drugslevitra generikaOnline Levitra 20 mgwhat does vardenafil dovardenafil uterine thicknesslevitra hourslevitra cost of salesGeneric Levitra 10 mg ordervardenafil lengthvardenafil sideviagra cyalis levitra comparedlevitra pictureslevitra for salevardenafil online cheapLevitra 20 pills BuyLevitra Free Airmail shipping onlinebuy levitra online atgeneric levitra manufacturermaximum dosage levitravardenafil Courier shipping SaleSale vardenafil 10 pillswhat is better levitra or viagradifference between cialis levitra viagralevitracialis compare levitramedical drug levitravardenafil patent levitraprice levitralevitra tablevardenafil vs cialisvardenafil 180 pills Buyeffects of levitraget levitra drug onlinedreampharmaceuticals from levitranew erectile drug vardenafilover the counter levitrabuy levitra australiangeneric vardenafil indiacialis dysfunction erectile levitralevitra side effects visiondiscount levitra pillsOnline vardenafil Free Insurancecanadian pharmacy levitralevitra low costlevitra reviewsPurchase Generic Levitranew erectile drug levitravardenafil usevardenafil pricinglevitra herb alternativeOrder Generic vardenafil 20 mgvardenafil max complaintsfree vardenafil sampleslevitra or viagraSale Levitra 10 mglevitra lowest pricecheap vardenafil siproblems with levitralevitra suppliers in the ukwatermelon levitralevitra to buy new zealandmedicine levitralevitra 10 mg tabletbuy levitra online dream pharmaceuticalsoft levitra mastercardlevitra ingredientsvardenafil perscription onlinegeneric levitra cheapcanadian vardenafillevitra and price listvardenafil hcl 20 mgbayer levitra onlinefree trial of vardenafilbuy levitra delived fed exrecreational levitra usekey buy levitra onlinelevitrabuy cheap levitra onlineGeneric vardenafil 10 mg onlineorder cheap levitra faslevitra by bayervardenafil 30 pills onlineship free vardenafil sampleregalis vardenafilbuy levitra usvardenafil super activeLevitra 180 pills Buydrug levitra newvardenafil purchasevardenafil 30 pills orderprofessional levitra627 discount levitra online 903levitra and premature ejaculationpfizer vardenafilcialis levitra or viagralevitra twice a daysnorting levitraorder 50mg levitrabuy Levitra 10mgLevitra pills Buybuy cheap levitra onlinelevitra vs cialis reviewbrand name levitratake levitralevitra pill pricevardenafil optionslevitra cialis for womenhow to get levitravardenafil alternativespharmacy vardenafilbuy levitra ukvardenafil hcl 20mg tab side effectsbuy levitra in ukgeneric levitra professionallevitra efectosgeneric levitra effectiveorder vardenafil 10 mg2buy levitra online viagralevitra worksflomax and levitraSale Levitra Airmail shippingclinical data levitrageneric levitra soft tab fasti have levitrarx levitravardenafil 120 pillsbuy vardenafil meds onlinevardenafil online no prescriptionis vardenafil professional realcheap vardenafil walmartuk levitrabuy levitra in canadavardenafil from indiafree sample pack of levitramature vardenafilhow long is levitra effectivelevitra price comparisonlevitra storyvardenafil effekter biverkningarvardenafil for teenscheapest levitra in ukfda on levitralevitra fedexgeneric vardenafil mexicosample levitralevitra best resultslevitra substitutelevitra generic soft tabsafe maximum levitra dosagelevitra online cheapLevitra pills onlinevardenafil free sampleslevitra dysfunction erectilelevitra rxlevitra from mexicovardenafil drug prescriptionvardenafil discountsOrder vardenafil Free Insurancelevitra precautionsbuy buy cheap cheap levitra levitralevitra v s levitravardenafil sex dominationlevitra success storieslevitra for womanvardenafil 20 mg paypallevitra sverigecheap levitra overnightOrder Levitra Airmail shippingbuy vardenafil 10 pillscounterfeit levitrabuy levitra 30 pillsvardenafil suppliers in the ukvardenafil effective timeLevitra Courier shipping orderorder levitra from canadabuy drug satellite tv levitralevitra 20order vardenafillevitra wholesale onlinelevitra fast overnight delivery usa onlyuser review levitracialis and levitra generic brandgeneric levitralevitracialis generic levitra viagralevitra online usdoes levitra look likebuy levitra lowest pricescompare viagra levitralevitra on linesample of levitraviagra cialis levitra candian pharmacy safecheap vardenafil nzprice of vardenafilbuy online vardenafilnatural levitrageneric levitra pillsnatural equivalent ingredient in vardenafilordering vardenafillevitra free pillsbuy vardenafil in uklevitra order2buy generic levitralevitra pay with paypalvardenafil in uk onlineglaxo levitravardenafil and commercialvardenafil 50 mglevitra with lisinoprilwhat does levitra dobuy levitra medicationlevitra couchcan a woman take levitravardenafil 10mgreal levitralevitra offervardenafil 10 pills Buylowest prices for levitracanada vardenafilfree levitra pillscheapest online cost for levitravardenafil generic pricevardenafil gelvardenafil mexicovardenafil ukon levitralevitra discussiongeneric name of levitrabuy vardenafil 30 pillslevitra price walmartlevitra time effectiveLevitra Free Airmail shipping Salevardenafil wholesale onlinelevitra andacheter levitra francecheap vardenafil 20 mgwoman in levitra commercialpill identification levitrageneric discount levitralevitra 20 mg dosagelevitra interactionsoriginal levitrapurchase vardenafil 10mgbuy levitra online in 24 hoursvardenafil for sale without a prescriptionlevitrabuy levitra onlineLevitra 10 mg onlineviagra medication prescription levitra cialis propecialevitra anwendungviagra cialis levitra vpxlcan woman take levitrabuy levitra upsLevitra 90 pills BuySale vardenafil pillovernight vardenafilvardenafil reviewslevitra drugswatermellon vardenafilbuy levitra without prescriptionquery lowest levitra price onlinebuying levitra onlinelevitra generic priceusing levitralevitra for freegeneric viagra levitra generic cialis pillsvardenafil testimonialGeneric Levitra 20 mg ordervardenafil on linevardenafil Free Airmail shipping onlinehow long will levitra lastq buy levitraorder discount levitraviagra levitra cialis offerslevitra and bayercheap pharmacy viagra cialis levitralevitra vs viagra reviewswomans levitraburing levitra onlinelevitra softbuy cheap levitralevitra drug prescriptionbuy levitra in englandvardenafil Salevardenafil for daily useactress in levitra commercialbuy levitra with pay palcheap vardenafil overnightindia vardenafilvardenafil pill orderbuy levitra online 35008 buylevitra pill cuttervardenafil sizevardenafil uk cost pillvardenafil 60 pills onlinegeneric soft tabs vardenafilkey buy levitra cheaplevitra cheap buy onlinelow price vardenafilcheap vardenafil tabletslevitra onlinevardenafil 20 mg orderblindness cialis levitravardenafil levitra onlinelevitra faqsplitting levitravardenafil in ukvardenafil lowest priceprozac interactions with viagra cialis levitrakeywords cialis levitra sales viagrahow quick does levitra workwhat is levitra productPurchase vardenafil Free Airmail shippingLevitra 20 mgcomparison of cialis levitra and viagraovernight shipping of professional vardenafilbenefits of levitralevitra vs viagra which is better2buy cheap levitra onlinelevitra prices american pharmaciesvardenafil online overnightdiscount levitra cialis viagrabuy cheap levitra xanax xenicalorder levitra onlinecheapest vardenafil substitute vardenafilbuy vardenafil cialasbuy cheap generic levitra pharmacy onlinelevitra soft tablevitra third quarter 2004 saleslevitra bestellenvardenafil fedexviva levitra commercialLevitra Courier shipping Salecheapest vardenafil professionalLevitra 10 pills Buycheap vardenafil canadaOnline Levitra Free Airmail shippingfull information levitradiscounted vardenafillevitra substitutesLevitra 20 mg Buylevitra 20 mg bayerbuy vardenafil delived fed exforeign cialis levitra pillswomen vardenafilvardenafil overnight shippingcan women use levitravardenafil Buyvardenafil propafenonelevitra provardenafil impotence drug eli lilly cobuy levitra viagralevitra web siteship free levitra sampleorder levitra without prescriptionfree levitra onlinesuper levitralevitra in ukcompare viagra 26 levitra2cheap levitra onlineOrder vardenafilvardenafil Courier shipping orderbuy vardenafilvardenafil storieslevitra successdiscount levitra purchasecheapest levitra substitute sildenafillevitra cialis viagra comparebuy vardenafil online in ukLevitra 20 mg onlineordering levitraconnecticut levitra vardenafillevitra productsLevitra Free Airmail shipping BuyGeneric vardenafil 10 mg Sale
intense creativity » Tutorial - Multi Touch in AS3 / Flash Player 10.1 - Part 1. Setting Up

Tutorial - Multi Touch in AS3 / Flash Player 10.1 - Part 1. Setting Up

Hi Everyone,

I had the pleasure, although it was a strenuous experience, to work on Adobe Post. It is still a private project; undertaken by 80/20 Studio in NYC on behalf of Adobe. It was demonstrated (shortly) by Kevin Lynch at the Adobe MAX conference on Oct 14th, 2009. It implements one of the nicest new features of Flash Player 10.1: Multi-Touch.

Theoretical Information
There are a few multi-touch information pages on the internet about flash out there. Some are relevant, some were of third party software that enabled multi-touch in Flash or AIR prior to FP10.1 or Air 2.0. This article is very good however. It will give you a more theoretical overview than I can offer, I am a hands on person; not much of an intellectual.

Choosing your Hardware
First, to use multi-touch you need to have multi-touch enabled hardware; and a multi-touch enabled OS. For the purpose of development (and it proved to be the most stable platform) I used a HP TouchSmart TX2 which quite honestly is nothing impressive except for its resistive Touch Screen that is developed by nTrig. This touchscreen reportedly supports 4 simultaneous touch points.

The Adobe demo took place on a HP TouchSmart PC. This PC reportedly supports 2 simultaneous touch points through its NextWindow technology.

From my observations, the number of simultaneous touch points supported by hardware is corresponds to this formula: (Reported simultaneous touch points supported) - 1. By this I mean that the TX2 behaves very well with 3 fingers, but goes completely bezerk with 4 fingers. The TouchSmart PC behaves great with 1 finger, and a little oddly with 2 fingers down. Meaning that... you can't really do multi-touch on a TouchSmart PC.

What will happen? When you are rotating objects with 2 fingers on the TouchSmart PC it will screw up and start rotating them backwards, it will inverse touch points, and so on. Making it less than usable for the use we had in mind.

I am coming from a PC standpoint, and I heard that certain Wacom tablets did work as well. Take into consideration you need proper drivers, most of the time updated drivers downloaded fresh from the manufacturer's website.

As far as Mac computers are concerned, I have no information on the subject. If anyone does, please leave comments or contact me!

The Right OS
Windows 7 supports multi-touch (really!). It also supports gestures, which are rather slow. During the development phase, while Flash Player 10.1 was not yet in public beta it would crash regularly on the 32 bit version of Windows 7. Meaning you needed 64 Bit Win 7 to get it going.

The Right Drivers
For NextWindow driven hardware (HP TouchSmart PC, Dell Studio One), the drivers are available here.
For nTrig driven hardware (Dell Latitude XT(2), HP TouchSmart tx2), the drivers are here.

I don't know about the WACOM downloads.. You'll need to search.

Getting Started
This demonstration will use FlashDevelop, the Flex SDK 3.4 & Adobe Flash Player 10.1 Pre-release.

For Flash Player 10.1 pre-release you will need to download the Player Global SWC found at the bottom of the page.

Simple steps to get started, assuming you have Flex SDK installed somewhere, FlashDevelop running, and installed both the ActiveX and Plug-in versions of Flash Player 10.1; and that you have configured FlashDevelop to point to the proper FlexSDK directory:

  • Create a new AS3 Project with Preloader in FlashDevelop; I called it simply MultiTouch
  • Configure your project to target Flash Player 10
  • Copy the contents of the Player Global SWC Zip -- the file you want is playerglobal.swc at 296,145 bytes -- into your {project_root}/libs folder. This will give you auto-completion on the new objects.
  • Copy the same file playerglobal.swc to your {flex_sdk_home}/frameworks/libs/player/10 directory -- I am not sure if this is needed.. but it works

Testing Your Setup
The first, and most important step, to confirm you have installed everything correctly (drivers, OS, flash player, playerglobal.swc) is to check if the flash.ui.MultiTouch object is available, and then to see if you can specify your inputMode (either gestures or touchPoints) and finally to see how much simultaneous touchpoints your hardware has to offer.

Since tracing in FlashDevelop only works in debug mode, I created a TextField and added to the stage and printed out the information I wanted directly in that TextField... Here is the source:

Actionscript:
  1. package
  2. {
  3.     import flash.display.Sprite;
  4.     import flash.events.Event;
  5.     import flash.text.TextField;
  6.     import flash.ui.Multitouch;
  7.     import flash.ui.MultitouchInputMode;
  8.    
  9.     /**
  10.      * ...
  11.      * @author Martin Legris ( http://blog.martinlegris.com )
  12.      */
  13.     public class Main extends Sprite
  14.     {
  15.         protected var _tf:TextField;
  16.        
  17.         public function Main():void
  18.         {
  19.             if (stage) init();
  20.             else addEventListener(Event.ADDED_TO_STAGE, init);
  21.         }
  22.        
  23.         private function init(e:Event = null):void
  24.         {
  25.             removeEventListener(Event.ADDED_TO_STAGE, init);
  26.             // entry point
  27.             _tf = new TextField();
  28.             _tf.width = stage.stageWidth;
  29.             _tf.height = stage.stageHeight;
  30.             _tf.mouseEnabled = false;
  31.             addChild(_tf);
  32.            
  33.             Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;
  34.             _tf.text = "Input Mode: " + Multitouch.inputMode + "\n";
  35.             _tf.appendText("Touch Points: " + Multitouch.maxTouchPoints + "\n");
  36.             _tf.appendText("Supports Touch Events: " + Multitouch.supportsTouchEvents + "\n");
  37.            
  38.         }
  39.     }
  40. }

You should get something like this:
Output of first MultiTouch SWF

It should read:

- inputMode: touchPoint
- Touch Points: 4 -- can be 2 depending on hardware
- Supports Touch Events: true

If you have something similar, this means success! You can now start coding!



Related posts (automatically generated):

  1. Tutorial - Multi Touch in AS3 / Flash Player 10.1 - Part 2. TouchEvent & MouseEvent Sequences


11 Responses to “Tutorial - Multi Touch in AS3 / Flash Player 10.1 - Part 1. Setting Up”

  1. Andre Dickson says:

    This is exactly the tutorial I was looking for. I’m running a very similar setup: Windows 7 Home Premium 64-bit, and a Dell SX2210T Monitor. I’ve updated my drivers, have both the plugin and active X 10.1 Flash Players installed, and have copied the 10.1 playerglobal.swc as mentioned above. I’m also using FlashDevelop, however I’m using the 3.5 milestone release of the Flex SDK. Are you using the 3.4.1 stable build? The compiler is ok with using the Multitouch class but any code after the ‘Multitouch’ class reference does not run (runtime error, right?).

  2. Martin Legris says:

    @Andre,

    Make sure you are running it in the right version of the player. When you install Flash Player 10.1 pre-release it doesn’t give you the stand-alone player. I have the stand-alone 10.1 player but an older version and I am not sure I am allowed to give it to anybody.

    So make sure that your example is running inside of FlashDevelop and not in it’s own window, and that it is running on 10.1. Otherwise it will break when trying to execute anything that has to do with multi-touch. If you can’t figure it out email me. We can talk. I am open to helping you out; I don’t have much work right now..

  3. Andre Dickson says:

    Thanks for the quick reply Martin. I now have everything working (at 4am, with work starting in 5 hours, wahoo!). I was originally using the standalone player, which I realized wasn’t right when it was showing ‘Flash Player 9′ in the title bar (doh!). Thanks for the tip. I attempted to set the project to ‘open in a tab’ within FlashDevelop earlier but wasn’t having any luck. To get the right results I wiped-out every instance of Flash Player, uninstalled the dead Flash Professional CS3 trial and FlashDevelop and started over clean. I’m a little disappointed that my new Dell multitouch monitor only supports 2 touch points. They should call it dual-touch. Thanks again for the article, and being so helpful.

  4. Felipe Botero says:

    Well… i have tested it with the bamboo touch and pen, and it seems it doesnt work :(

  5. Ken says:

    Hi Martin,

    Please help Felipe, he really need your help.

  6. Stan says:

    Thanks for this Martin!

  7. JC says:

    @Felipe

    Maybe you already know this but for anybody who is wondering, it seems the Bamboo touch and pen is not supported.

    http://theflashblog.com/?p=1678

  8. David says:

    Help please! It’s 2:42 am and I’m still @ work, trying to setup my FlashDevelop project, but I still can’t access the flash.ui.Multitouch nor flash.ui.MultitouchInputMode object :(
    Running Win7 64-bit Ultimate @ Dell SX2210T monitor with both Flash 10.1 plug-in/active x, Flex SDK 3.5 milestone release and globalplayer.swc in my project lib folder and Flex SDK/framework/libs/player/10 folder.
    FlashDevelop is pointing to the directory where I unzipped the Flex SDK and my project is targetting Flash Player 10. What am I doing wrong?

  9. Daniel says:

    Hey, I know that this is for windows, and you say you don’t know anything about Mac, but I’m trying to get this to work on my MacBookPro, but I get the textfield saying: Supports Touch Events: false.

    I’m using a multitouch macbookpro with snow leopard, and I was wondering if anyone knew if I needed to do anything different for OSX to make this work.

    Thanks

  10. Og2t says:

    @Daniel, are you targeting AIR2.0? I think it will only work there as Flash plug-in can’t yet receive touch events.

  11. Raju says:

    I can confirm that it worked for me with the AIR 2.0 beta on OS X Snow Leopard.

Leave a Reply