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.