Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Swipe Gestures using Air for ios

Explorer ,
Apr 22, 2013 Apr 22, 2013

I am trying to do a swipe guesture on a move clip. I want the movie to move up and down when you swipe but I need to make sure it doesn't move too far and get lost.

I don't get any errors with my coding below but I also don't get any respone from it.

If aynone could help that would be great... If anyone has some coding I could use that would be amazing.

Many thanks.

Tim

var up:Boolean=false

var down:Boolean=false

MidsInfo.addEventListener( TransformGestureEvent.GESTURE_SWIPE, onSwipeMids );

function onSwipeMids (e:TransformGestureEvent):void{

if (e.offsetY == 1) {

if(up==true && MidsInfo.y<2000){MidsInfo.y+=4}

}

if (e.offsetY == -1) {

if(down==true && MidsInfo.y>0){MidsInfo.y-=4}

}

}

TOPICS
ActionScript
304
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Apr 22, 2013 Apr 22, 2013
LATEST

you are never doing anything with your up&down vars, so your conditions for the swipe_handler are never met.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines