text: Flash Builder 4 multitouch device support on Windows 7yenpei Dec 20, 2009 11:41 PM
  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 7David_F57 Dec 21, 2009 1:00 AM (in response to yenpei)1 person found this helpful
  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
  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=""
  xmlns:s="library://ns.adobe.com/flex/spark"
  xmlns:
  <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
  </s:Application>
  2. Re: Flash Builder 4 multitouch device support on Windows 7yenpei Dec 21, 2009 5:12 AM (in response to David_F57)
  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?
  Kind Regards,
  Yen Pei
  3. Re: Flash Builder 4 multitouch device support on Windows 7David_F57 Dec 21, 2009 6:22 AM (in response to yenpei)
  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=""
  xmlns:s="library://ns.adobe.com/flex/spark"
  xmlns:
  <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
  <mx:Zoom
  </fx:Declarations>
  </mx:Image>
  4. Re: Flash Builder 4 multitouch device support on Windows 7yenpei Dec 21, 2009 7:50 AM (in response to David_F57)
  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 7David_F57 Dec 21, 2009 7:59 AM (in response to yenpei)
  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 7yenpei Dec 21, 2009 7:54 PM (in response to David_F57)
  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 7David_F57 Dec 21, 2009 7:58 PM (in response to yenpei)
  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 7yenpei Dec 21, 2009 8:07 PM (in response to David_F57)
  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)
  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 7David_F57 Dec 21, 2009 11:36 PM (in response to yenpei)
  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 7yenpei Dec 22, 2009 5:09 AM (in response to David_F57)
  11. Re: Flash Builder 4 multitouch device support on Windows 7Herre_84 Feb 1, 2010 8:03 AM (in response to yenpei)
  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 7Herre_84 Feb 1, 2010 8:09 AM (in response to Herre_84)
  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 7David_F57 Feb 1, 2010 8:35 AM (in response to Herre_84)
  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