3 Replies Latest reply on Aug 29, 2011 11:24 AM by Don Kerr

    TouchEvents and Gesture Events

    anjana 86

      Hi,

       

      I am new to the touch screen development in flex. I have one query. Is it possible to switch the input mode from touch point to gesture during run time.

       

      Can you please let me know how can i handle this. If I use two fingers to zoom an image the zoom gesture should work. But if  I click on the image a touch_down event should be fired. Can you please help?

       

      I have one more query, if you can help. Are there any touch simulators available for a kiosk kind of application, where I can simulate the touches and test the application on a non touch enabled screen

       

      Thank you for your time!

        • 1. Re: TouchEvents and Gesture Events
          Don Kerr Level 3

          You can programmatically change the inputMode

          Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;

          or

          Multitouch.inputMode = MultitouchInputMode.GESTURE;

           

           

          You might check out Matt's SimTouch solution

          http://code.google.com/p/simtouch/

           

          However, if you plan to build lots of kiosk-like apps, I recommend you buy at least a multi-touch monitor or touch PC.

           

          On a Mac, you can test Gestures using the TrackPad just by running your air app in Flash Builder.

           

          Don

          • 2. Re: TouchEvents and Gesture Events
            anjana 86 Level 1

            Yes I we can change the input mode. But based on my touch type will the program be able to change the event listening mode. On the same image a single touch should load an application. A zoom kind of gesture should zoom the image. So how can the input mode change as per these user actions? I have to add 2 different touch inputs to the same touch object.

             

            I am sorry if I am being too naive.

            • 3. Re: TouchEvents and Gesture Events
              Don Kerr Level 3

              For sure, Air only supports one inputMode at a time.

               

              You might try staying in Gesture mode and using a different gesture (swipe, two finger tap) or mouse event (double click) to handle the open.

               

              Don