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

Gestures Please Help me Urgent

Participant ,
Oct 28, 2013 Oct 28, 2013

Hi

So I have this code which controlls getures in my game

public function ScreenSwipe(e:TransformGestureEvent):void

{

                                    if(e.offsetY == -1 && e.stageX > 250)

                                     {

                                               V.P.gotoAndPlay("JumpDodge");

                                               V.SoundM.PlaySound(Sources.Dodge);

                                     }

                                     else if(e.offsetY == 1 && e.stageX > 250)

                                     {

                                               V.P.gotoAndPlay("DuckDodge");

                                               V.SoundM.PlaySound(Sources.Dodge);

                                     }

}

The problem is I need the gesture to call when you swipe any direction in the right area

if you dont understand what I mean I have attached a picture

3553.PNG

So if you swipe anywhere in any direction in the jump area the player will jump.

Thanks

TOPICS
ActionScript
330
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
Community Expert ,
Oct 28, 2013 Oct 28, 2013
LATEST

define gestureswipe event handlers for you jump and dodge objects.  if those aren't objects, convert them.

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