13 Replies Latest reply on Feb 1, 2010 8:35 AM by David_F57

    Flash Builder 4 multitouch device support on Windows 7

    yenpei

      I try to run an AIR2.0 multitouch photo app on Windows 7 with Multitouch LCD Dell SX2210T. Unfortunately no gesture was detected.

      I could use my finger to drag and drop the photo, but not pan, zoom, rotate?

       

      How does Windows 7 interact with AIR 2 for multitouch gestures? Is there any driver that I need to install?

        • 1. Re: Flash Builder 4 multitouch device support on Windows 7
          David_F57 Level 5

          Hi,

           

          Multitouch works without issue using the dell monitor, make sure that the dell drivers are installed. If you are using flashbuilder you can test multi-touch by installing the beta flashplayer 10.1 and also on the beta site is an updated flex global.swc so you can see the new multitouch events in the flashbuilder IDE

           

           

          http://labs.adobe.com/technologies/flashplayer10/

           

          this code works on a pc with W7x64 Flashbuilder Beta2 and a Dell 22" tm.(it only shows the interaction working on a zoom gesture it has no correction code so the image will zoom with each 2 point gesture until it exceeds the plashplayer size limit). Note this is a straight web app no Air 2 required.

           

          David.

           

           

          <?xml version="1.0" encoding="utf-8"?>

          <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"

             xmlns:s="library://ns.adobe.com/flex/spark"

             xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">

           

          <fx:Script>

          <![CDATA[

          protected function image1_gestureZoomHandler(event:TransformGestureEvent):void

          {

          event.currentTarget.scaleX=event.currentTarget.scaleX+event.scaleX;

          event.currentTarget.scaleY=event.currentTarget.scaleY+event.scaleY;

          }

          ]]>

          </fx:Script>

          <mx:Image width="209" height="157" source="file:/C:/Users/Public/Pictures/Sample Pictures/Desert.jpg" gestureZoom="image1_gestureZoomHandler(event)"

            horizontalCenter="0" verticalCenter="0"/>

          </s:Application>

          1 person found this helpful
          • 2. Re: Flash Builder 4 multitouch device support on Windows 7
            yenpei Level 1

            Hi David,

             

            Thanks. This helps.

             

            I'm trying hard to run the following AIR 2.0 Beta multitouch app. It can load the images but couldn't rotate, zoom or pan. See if you have problems running it?

            http://www.cynergysystems.com/blogs/blogs/andrew.trice/MAX09/05/

             

             

            Kind Regards,

            Yen Pei

            • 3. Re: Flash Builder 4 multitouch device support on Windows 7
              David_F57 Level 5

              Hi,

               

              the example on that site is pretty crappy as its incomplete/broken, I just quickly modified it so that it works(sort of), you need to create a new air project then create a new mxml file call it whatever you want or just use the 'ScatterviewImage.mxml' past the following code in then add the components to your air app and away you go

               

               

              <?xml version="1.0" encoding="utf-8"?>

              <mx:Image xmlns:fx="http://ns.adobe.com/mxml/2009"

                xmlns:s="library://ns.adobe.com/flex/spark"

                xmlns:mx="library://ns.adobe.com/flex/mx"

                gestureZoom="image1_gestureZoomHandler(event)"

                gestureRotate="image1_gestureRotateHandler(event)"

                mouseDown="image1_mouseDownHandler(event)"

                maintainAspectRatio="false">

              <fx:Script>

              <![CDATA[

              import mx.events.FlexEvent;

               

              protected function image1_gestureZoomHandler(event:TransformGestureEvent):void

              {

              rotate.stop();

              zoom.stop();

              zoom.zoomWidthFrom = this.scaleX;

              zoom.zoomWidthTo = this.scaleX * event.scaleX;

              zoom.zoomHeightFrom = this.scaleY;

              zoom.zoomHeightTo = this.scaleY * event.scaleY;

              zoom.play();

              }

               

              protected function image1_gestureRotateHandler(event:TransformGestureEvent):void

              {

              rotate.stop();

              zoom.stop();

              rotate.angleFrom = this.rotation;

              rotate.angleTo = (this.rotation + event.rotation);

              rotate.originX = this.width/2;

              rotate.originY = this.height/2;

              rotate.play();

              }

               

              protected function image1_mouseDownHandler(event:MouseEvent):void

              {

              this.startDrag();

              stage.addEventListener( MouseEvent.MOUSE_UP, onMouseUp );

              }

               

              private function onMouseUp( event : MouseEvent ) : void

              {

              this.stopDrag();

              stage.removeEventListener( MouseEvent.MOUSE_UP, onMouseUp );

              }

              ]]>

              </fx:Script>

              <fx:Declarations>

              <mx:Rotate id="rotate" target="{this}" duration="1" />

              <mx:Zoom id="zoom" target="{this}" duration="1" />

              </fx:Declarations>

              </mx:Image>

              • 4. Re: Flash Builder 4 multitouch device support on Windows 7
                yenpei Level 1

                It's the same. Hmmm...I guess there's something wrong with my Dell 2210, but strangely I can move/drag the pictures around, but not zoom or rotate. It seems like the event is not generated.

                • 5. Re: Flash Builder 4 multitouch device support on Windows 7
                  David_F57 Level 5

                  Hi,

                   

                  Have you copied the air sdk over the flex sdk ?

                   

                  Also have you tried just a flex app ? not using air.

                   

                  Its also very easy to see if your monitor is working in windows but just browsing the web and use zoom gestures in a browser as it will expand the web page (this works for google chrome and IE8).

                   

                  David.

                  • 6. Re: Flash Builder 4 multitouch device support on Windows 7
                    yenpei Level 1

                    Hi,

                     

                    The IE8 works well, zooming in and out without problem.

                     

                    The Flex application you gave me in your first example works fine. I can zoom the image till it's larger than the window and it got disappeared. I guess that's normal as per your earlier description.

                     

                    The only problem I have is running the AIR 2.0 app. I have replaced the Flex 4.0 SDK with AIR 2.0 SDK and reflect this in the Flash Builder complier secion. Is this sufficient?

                     

                     

                    Best Regards,

                    Yen Pei

                    • 7. Re: Flash Builder 4 multitouch device support on Windows 7
                      David_F57 Level 5

                      Hi,

                       

                      Give me a day and I will sort this out, I did some sdk and debug changes which seems to have broken my Air2 setup so once i have fixed that I will look at creating a 'solid' mulittouch test application for you.

                       

                      David

                      • 8. Re: Flash Builder 4 multitouch device support on Windows 7
                        yenpei Level 1

                        Thanks David. I'm not expecting you to troubleshoot for me but am trying it from my end as well.

                         

                        I use this AIR 2.0 app that can print out the coordinates on screen. Not surprisingly, as of now, nothing get printed on my AIR screen (signifying it does not recognise any gesture event)

                        http://www.cynergysystems.com/blogs/blogs/andrew.trice/MAX09/01/

                         

                        If you're using the above code, add the following lines:


                        import flash.events.PressAndTapGestureEvent;

                        addEventListener( PressAndTapGestureEvent.GESTURE_PRESS_AND_TAP, onMultitouchEvent );
                        • 9. Re: Flash Builder 4 multitouch device support on Windows 7
                          David_F57 Level 5

                          Hi,

                           

                          This project allows you to see what is going on,

                           

                          two fingertap, gesturepan, zoom , rotate will be indicated in the listbox(just messages no action is performed), one thing to note with the dell you really need to left your fingers a few millimeters of the screen between actions, the leds seem to pick up finger movement well before screen contact. I had a fly walking across the screen the other day and it managed to get the image list scrolling , at least flys know how to get things working.

                           

                          ezflex.net/AirTest.air     -- sourceview enabled

                           

                          If this works then your flashbuilder setup must need adjustment, if not reinstall Air 2.0 runtimes.

                           

                          David

                          • 10. Re: Flash Builder 4 multitouch device support on Windows 7
                            yenpei Level 1

                            Hi.

                             

                            I can't seem to be able to install the app. Which AIR version is required?

                            Capture.PNG

                            • 11. Re: Flash Builder 4 multitouch device support on Windows 7
                              Herre_84

                              Hi,

                               

                              I've got exactly the same problem (also using the Dell screen and running Windows 7): the Image is rendered to the screen, and I'm able to move the Image around (the classic MouseEvent works), but non of the zooming and rotating seems to work.

                               

                              Was this problem solved somewhere in any of the posts? Also, is there an updated link for the AirTest.air application?

                               

                              Thanks in advance,

                               

                              Hans

                              • 12. Re: Flash Builder 4 multitouch device support on Windows 7
                                Herre_84 Level 1

                                It seems that adding

                                 

                                Multitouch.inputMode = MultitouchInputMode.GESTURE;

                                 

                                after the ApplicationComplete resolves my problem...

                                 

                                Kind regards,

                                Hans

                                • 13. Re: Flash Builder 4 multitouch device support on Windows 7
                                  David_F57 Level 5

                                  Hi,

                                   

                                  Sorry ezflex.net is currently being moved to my own hosting server(its not online yet) but you can still download the file from here (its a very basic test case for the dell monitor)

                                   

                                  flashhub.net/ezflex/AirTest.fxp

                                   

                                   

                                  David