text: Hi !
  In FB I get a "TypeError: Error #1034: Type Coercion failed: cannot convert to org.gestouch.core.IInputAdapter.
  at Kiosk()[M:\Exibition kiosk\App\src\Kiosk.as:19]"
  At line 19 is : Gestouch.inputAdapter ||= new NativeInputAdapter(stage);
  When I run the same in Flash theres no problem.
  When I got the error I thought is was a conflict with somthing else, so I've stripped everything to just the initialization. Like:
  package{
  import flash.display.Sprite;
  import starling.core.Starling;
  import starling.display.DisplayObject;
  import org.gestouch.core.Gestouch
  import org.gestouch.input.NativeInputAdapter;
  import org.gestouch.extensions.starling.StarlingDisplayListAdapter;
  import org.gestouch.extensions.starling.StarlingTouchHitTester;
  [SWF(frameRate="60", backgroundColor="#ffffff")]
  public class Kiosk extends Sprite{
  public var pStarling:Starling;
  public function Kiosk(){
  pStarling = new Starling(Root, stage);
  Gestouch.inputAdapter ||= new NativeInputAdapter(stage);
  Gestouch.addDisplayListAdapter(starling.display.DisplayObject, new StarlingDisplayListAdapter());
  Gestouch.addTouchHitTester(new StarlingTouchHitTester(pStarling), -1);
  pStarling.start();
  }
  }
  }
  But still...
  Any idea as to what I should look for ?
  Thanks
  @SpriteLab
  yes, for the same problem in this topic.
  I'm sorry, could you be more specific ?-—-multitouch-gestures-for-starling-and-classic-displaylist/page/2#post-11689
  I needed just a simple left / right swipe so have worked out this way, if it helps to anybody:
  private var SwipeStart:Number;
  private var SwipeEnd:Number;
  this.addEventListener(TouchEvent.TOUCH, onTouch);
  private function onTouch(event:TouchEvent):void
  {
  touch = event.getTouch(stage);
  if ( event.getTouch(stage,"began") != null)
  {
  SwipeStart = touch.globalY;
  }
  if ( event.getTouch(stage,"ended" ) !=null )
  {
  SwipeEnd = touch.globalY;
  if ( SwipeStart - SwipeEnd >= 100) // with the length of swipe ;)
  {
  trace ("left");
  }
  if ( SwipeStart - SwipeEnd <= -100)
  {
  trace ("right");
  }
  }
  }
  I'm using globalY as I have a portrait orientation, you can change to globalX obviously.
  With the same simple way you can also detect swipes up and down or even diagonal if needed.
  If you play with the "100" number you can get swipe length option for different actions.
  Additionally you can play around with the "began" "moved" "ended" to get more of it to suit your needs.
  Hope it helps.
  @Jacob
  I hope I never use application with UI like that.
  @Pavel
  So bad? Would you elaborate why ?
  because obviously swipe is not about the distance.
  Jacob, this also shouldn't have been posted in Pavel's main Gestouch library thread but maybe its own separate new topic, since it is completely unrelated to using the Gestouch library.
  I need a bit of help here.. I'm trying to implement both Pan and Swipe gesture at same time (maybe), as seen in Wally app
  I can't able to track Swipe gesture right after an end of Pan gesture - any one of the gesture I can able to track only at a time.
  So its like I Pan the Sprite to someway middle of the screen and then did a Swipe gesture.
  @Santanu Karar
  I have no idea what that app is and what kind of interaction design is there.
  So let me clarify your situation a bit. You want to be able to pan and then swipe without lifting your finger?
  Pavel, yes; you're right (sorry for confusing you by naming some App). An user can Pan and even swipe without lifting his/her finger if want.
  So there are 2 things to deal with:
  The 1st thing: two simultaneous [gesture] recognitions. We need to allow that specifically, because by default once one gesture is recognized, others [that were attempted to be recognized] fail. To achieve our goal we set *roughly*
  panGesture.gesturesShouldRecognizeSimultaneouslyCallback = function(gesture:Gesture, otherGesture:Gesture):Boolean
  {
  return (gesture == panGesture && otherGesture == swipeGesture);
  }
  now we allow both gestures simultaneous recognition. But you will notice that swipe gesture will fail quickly due to it's inner logic. Therefore 2nd thing:
  swipeGesture.maxDuration = 1e6;// more than 16 minutes
  swipeGesture.minOffset = Number.MAX_VALUE;
  This way our swipe gestures loses general short allowed time window (maxDuration in milliseconds) and minimum offset recognition condition, which only leaves us velocity-based recognition logic with minVelocity property with a value of (Capabilities.screenDPI / 1500) [px/ms]. (Actual constants:
  private static const MAX_DURATION:uint = 500;
  private static const MIN_OFFSET:Number = Capabilities.screenDPI / 6;
  private static const MIN_VELOCITY:Number = 2 * MIN_OFFSET / MAX_DURATION;
  Tell me how good it works and if you had to adjust minVelocity.
  I couldn't found maxDuration or even duration in SwipeGesture class; I'm using 0.4-alpha.swc. Doing minOffset only does nothing, though.
  I also tried downloading sources from Github, but the source doesn't have any PanGestureEvent, SwipeGestureEvent, nor SwipeGesture has a delegate property. I returned to using SWC instead.
  And why are you using such an old one?
  No more specific events and delegates. org.gestouch.events.GestureEvent and callbacks instead.
  I followed through the link, but can't remember now whether I downloaded it recently or sometime back. Though it seems the example files at are yet to update with the recent build version (?) DependentSwipingGesturesView.mxml still have IGestureDelegate call but I had to remove that implements while run.
  The output is behaving odd though (either calls swipe or Pan continuously or calls only Pan) - depending upon using or not using the following code:
  pan.requireGestureToFail(swipe);//NB! this is weak reference
  I still have this method calls inside MXML page:
  public function gesturesShouldRecognizeSimultaneously(gesture:Gesture, otherGesture:Gesture):Boolean
  {
  return (gesture == pan && otherGesture == swipe);
  }
  In addedToStage function I have:
  protected function onViewActivate():void
  {
  pan = new PanGesture(this);
  pan.addEventListener(org.gestouch.events.GestureEvent.GESTURE_BEGAN, onPan);
  pan.addEventListener(org.gestouch.events.GestureEvent.GESTURE_CHANGED, onPan);
  pan.slop = 0;
  swipe = new SwipeGesture(this);
  swipe.addEventListener(org.gestouch.events.GestureEvent.GESTURE_RECOGNIZED, onSwipe);
  swipe.direction = SwipeGestureDirection.RIGHT;
  //swipe.delegate = this;
  swipe.maxDuration = 1e6;// more than 16 minutes
  swipe.minOffset = Number.MAX_VALUE;
  //pan.requireGestureToFail(swipe);//NB! this is weak reference
  }
  Examples are slightly outdated, indeed.
  requireGestureToFail is not what you should deal with — I bet you haven't looked through Apple's tutorials -_-
  Add
  pan.gesturesShouldRecognizeSimultaneouslyCallback = gesturesShouldRecognizeSimultaneously;
  Remove:
  swipe.direction = SwipeGestureDirection.RIGHT;
  By default direction property is the set of orthogonal directions (allowed directions). If you set it to specific one — swipe gesture will become more strict and will most likely fail in your case due to your finger moving some different direction (while performing "pan"). If you want specific direction — in your case swipe gesture class must be extended to alter it's behaviour.
  Pavel, thank you very much for your continuous support. Its true I haven't looked through Apple's tutorials.
  I've added the new Pan property that you described. The behavior of gestures now a bit better but not accurate. Now while panning (even very slowly) certainly swipe fires - the combinations aren't very smooth yet; there is no guarantee when Swipe will fire when Pan is in process.
  Thanks..
  Try to adjust swipe. minVelocity. This is the only parameter left used to recognition.
  Ah sorry, I just made an extra check — the velocity is calculated quite roughly — total offset / total time. Which is OK for the original short time window logic!, but obviously not for your very custom swipe. I'll make an example later today how to extend SwipeGesture class and customize velocity calculation so it would work for your scenario.