TransformGestureEvent.GESTURE_SWIPE

I am trying to capture a general call and have not been able to.  Here is the code:

public class MySwipeTest extends Sprite    {
    public function MySwipeTest() {
        var myLabel:Label = new Label();
    myLabel.text = "swipe this";
    addChild(myLabel);
    myLabel.addEventListener(TransformGestureEvent.GESTURE_SWIPE, function(event:TransformGestureEvent):void {
        myLabel.text="label swiped";
        });
  addEventListener(TransformGestureEvent.GESTURE_SWIPE, function(event:TransformGestureEvent):void {
            myLabel.text="swipe";
        });
    }
}

Anyone can report what I could to hurt?  Thanks in advance!

Frank

Touch events are inaccessible in the simulator at the moment. You my fake it with some tactile devices activated (on mac it this big expensive trackpad whose name has disappeared from my mind), possibly under windows or linux there is something else, but I wasn't looking.

Tags: BlackBerry Developers

Similar Questions

  • With the help of TransformGestureEvent.GESTURE_SWIPE and TOUCH_TAP

    Hello

    I'm trying to create a slide in as3 for mobile with a different Touch events, but my experience does not allow me to finalize the script.

    This is a slide that moves from left to right and I would like to redirect on a picture of the scenario when TOUCH_TAPE or click


    Can you help me


    My script

    Multitouch.inputMode = MultitouchInputMode.GESTURE;

    var currentGalleryItem:Number = 1;

    var totalGalleryItems:Number = 4;

    stage.addEventListener (TransformGestureEvent.GESTURE_SWIPE, fl_SwipeToGoToNextPreviousFrame);

    function fl_SwipeToGoToNextPreviousFrame(event:TransformGestureEvent):void

    {

    if(Event.OffsetX == 1)

    {

    If (currentGalleryItem > 1) {}

    -currentGalleryItem;

    slideRight();

    }

    }

    ElseIf (event.offsetX == - 1).

    {

    if(currentGalleryItem < totalGalleryItems) {}

    currentGalleryItem ++;

    slideLeft();

    }

    }

    }

    var slideCounter:Number = 0;

    function slideLeft() {}

    gallery_items.addEventListener ("enterFrame", moveGalleryLeft);

    }

    function slideRight() {}

    gallery_items.addEventListener ("enterFrame", moveGalleryRight);

    }

    function moveGalleryLeft(evt:Event) {}

    gallery_items.x = 48;

    slideCounter ++;

    if(slideCounter == 10) {}

    gallery_items. RemoveEventListener ("enterFrame", moveGalleryLeft);

    slideCounter = 0;

    }

    }

    function moveGalleryRight(evt:Event) {}

    gallery_items.x += 48;

    slideCounter ++;

    if(slideCounter == 10) {}

    gallery_items. RemoveEventListener ("enterFrame", moveGalleryRight);

    slideCounter = 0;

    }

    }

    Stop();



    Thank you

    Thank you for all

    I appreciate your help

    Sincerlly

  • code by scanning

    What is the correct code for the sweep feature or is there a qnx based?

    ==============

    import flash.events.TransformGestureEvent;

    Multitouch.inputMode = MultitouchInputMode.GESTURE;
    stage.addEventListener (TransformGestureEvent.GESTURE_SWIPE, fl_turnPage);

    function fl_turnPage(event:TransformGestureEvent): void
    {
    if(Event.OffsetX == 1)
    {
    prevFrame();
    }
    ElseIf (event.offsetX == - 1).
    {
    nextFrame();
    }
    }

    Currently, you can not test gestures multitouch on the playbook. the Simulator is not now allow us to do so. you will have to wait for the current device or wait for a more equipped Simulator is released.

  • How to drag a particular area only in the Air for IOS

    Dear friends,

    IAM, creating an app for iOS using Air and AS3. I have a band below my screen I put buttons to click and go to private lessons. IAM creating striking swipe for these buttons. I have this code below:

    Multitouch.inputMode = MultitouchInputMode.GESTURE;

    stage.addEventListener (TransformGestureEvent.GESTURE_SWIPE, fl_SwipeHandler);

    function fl_SwipeHandler(event:TransformGestureEvent):void

    {

    Switch (Event.OffsetX)

    {

    slipped right

    case 1:

    {

    sw_area. Buttons.x += 20;

    break;

    }

    slid left

    box - 1:

    {

    sw_area. Buttons.x-= 20;

    break;

    }

    }

    }

    The code above makes the buttons inside the box to slide to move while sliding on the stage... I want the user to swipe Strip area available instantly drag and drop buttons. If the user swipes on the stage should not move. How can I do? pls help me friends.

    I changed as

    sw_area.addEventListener (TransformGestureEvent.GESTURE_SWIPE, fl_SwipeHandler);

    It does not work. pls help me solve this problem.

    Thanks in advance,

    Syed Abdul Rahim

    Hi friends,

    I've solved, can be usful to others... I used stageY to the control.

    Multitouch.inputMode = MultitouchInputMode.GESTURE;

    stage.addEventListener (TransformGestureEvent.GESTURE_SWIPE, fl_SwipeHandler);

    function fl_SwipeHandler(event:TransformGestureEvent):void

    {

    Switch (Event.OffsetX)

    {

    slipped right

    case 1:

    {

    If {(event.stageY > 650)

    sw_area. Buttons.x += 20;

    }

    break;

    }

    slid left

    box - 1:

    {

    If {(event.stageY > 650)

    sw_area. Buttons.x-= 20;

    }

    break;

    }

    }

    }

  • How function active scan to previous frame?

    I use the script below, the problem is the function to the previous image did not work, his command always at the last picture, please help me, tq

    * to frame 1

    Multitouch.inputMode = MultitouchInputMode.GESTURE;

    stage.addEventListener (TransformGestureEvent.GESTURE_SWIPE, fl_SwipeToGoToNextPreviousScene_a);

    function fl_SwipeToGoToNextPreviousScene_a(event:TransformGestureEvent):void

    {

    if(Event.OffsetX == 1)

    {

    slipped right

    Stop();

    }

    ElseIf (event.offsetX == - 1).

    {

    slid left

    gotoAndPlay (2);

    }

    }

    *-field of 10

    Multitouch.inputMode = MultitouchInputMode.GESTURE;

    stage.addEventListener (TransformGestureEvent.GESTURE_SWIPE, fl_SwipeToGoToNextPreviousScene_b);

    function fl_SwipeToGoToNextPreviousScene_b(event:TransformGestureEvent):void

    {

    if(Event.OffsetX == 1)

    {

    slipped right

    gotoAndPlay (2);

    }

    ElseIf (event.offsetX == - 1).

    {

    slid left

    gotoAndPlay (11);

    }

    }

    *-field of 20

    Multitouch.inputMode = MultitouchInputMode.GESTURE;

    stage.addEventListener (TransformGestureEvent.GESTURE_SWIPE, fl_SwipeToGoToNextPreviousScene_c);

    function fl_SwipeToGoToNextPreviousScene_c(event:TransformGestureEvent):void

    {

    if(Event.OffsetX == 1)

    {

    slipped right

    gotoAndPlay (11);

    }

    ElseIf (event.offsetX == - 1).

    {

    slid left

    gotoAndPlay (21);

    }

    }

    *-field of 40

    Multitouch.inputMode = MultitouchInputMode.GESTURE;

    stage.addEventListener (TransformGestureEvent.GESTURE_SWIPE, fl_SwipeToGoToNextPreviousScene_d);

    function fl_SwipeToGoToNextPreviousScene_d(event:TransformGestureEvent):void

    {

    if(Event.OffsetX == 1)

    {

    slipped right

    gotoAndPlay (21);

    }

    ElseIf (event.offsetX == - 1).

    {

    slid left

    gotoAndStop (40);

    }

    }

    Capture.PNG

    Use removeEventListener to remove event listeners. for example,.

    stage.removeEventListener (TransformGestureEvent.GESTURE_SWIPE, fl_SwipeToGoToNextPreviousScene_a);

  • So, Go to Previous stage and play Air for iOS

    Hi, I use this script action to create a simple touch App.

    / * Move to go to the next or previous scene - and Play

    Drag the scene moves the playhead to the previous scene in the timeline and keep reading of this scene.

    */

    Multitouch.inputMode = MultitouchInputMode.GESTURE;

    stage.addEventListener (TransformGestureEvent.GESTURE_SWIPE, fl_SwipeToGoToNextPreviousScene_5);

    function fl_SwipeToGoToNextPreviousScene_5(event:TransformGestureEvent):void

    {

    if(Event.OffsetX == 1)

    {

    slipped right

    prevScene();

    }

    ElseIf (event.offsetX == - 1).

    {

    slid left

    nextScene();

    }

    }

    It works fine if I did only two scenes, but I have more than that. For now, it will be reset at the beginning and not pass the stage 2.

    Should I change this code here?

    if(Event.OffsetX == 1)

    {

    slipped right

    prevScene();

    }

    ElseIf (event.offsetX == - 1).

    {

    slid left

    nextScene();

    }

    }

    Any advice would be helpful.

    Thank you

    You must add a stop() in each scene.

  • question of multitouch gestures

    1046: type was not found or is not a constant of compilation: ransformgestureeventt

    try adding swipe gesture to scroll_mc but error 1046 Type was not found or was not a compilation constant: TransFormGestureEvent.

    Why?

    package {}

    import flash.desktop.NativeApplication;

    import flash.desktop.SystemIdleMode;

    import flash.display.MovieClip;

    import flash.media.Video;

    import flash.net.NetConnection;

    to import flash.net.NetStream;

    import flash.events.MouseEvent;

    import flash.events.NetStatusEvent;

    import fl.controls.List

    import flash.events.Event;

    import flash.ui.Multitouch;

    import flash.ui.MultitouchInputMode;

    SerializableAttribute public class Main extends MovieClip {}

    public var song ["hatizmoret.flv", "tarnegol.flv", "se_ugdi.flv", "dag.flv"]

    public var song_number:String

    .....

    public var scroll_mc:MovieClip

    public void Main() {}

    scroll_mc. AddChild (a1)

    .........

    A1.x = posX

    A1.y = bouquet

    A1. Height = high;

    A1. Width = widt;

    A1.addEventListener (MouseEvent.CLICK, next_frame1);

    .......

    scroll_mc.addEventListener (TransformGestureEvent.GESTURE_SWIPE, fl_SwipeHandler);

    NativeApplication.nativeApplication.systemIdleMode = SystemIdleMode.KEEP_AWAKE;

    netConnection = new NetConnection();

    NetConnection.connect() (null);

    netStream = new NetStream (netConnection);

    netStream.client = this;

    netStream.addEventListener (NetStatusEvent.NET_STATUS, statusUpdated);

    video = new Video();

    video.attachNetStream (netStream);

    Video.Width = 480;

    Video.Height = 320;

    addChildAt (video, 0);

    }

    ...............

    setupControls();

    trace (VIDEO_URL)

    trace (song_number)

    }

    public void fl_SwipeHandler(event:TransformGestureEvent):void

    {

    Switch (Event.OffsetX)

    {

    slipped right

    case 1:

    {

    scroll_mc.x += 20;

    break;

    }

    box - 1:

    {

    scroll_mc.x = 20;

    break;

    }

    }

    switch (Event.OffsetY)

    {

    case 1:

    {

    scroll_mc.y += 20;

    break;

    }

    box - 1:

    {

    scroll_mc.y = 20;

    break;

    }

    }

    }

    public function hideBtns (): void {}

    Controls.Visible = false;

    Blocker. Visible = false;

    }

    public void showBtns(btns:Array):void {}

    Controls.Visible = true;

    Blocker. Visible = true;

    for (var instName:String in controls)

    {

    If (BTNS. IndexOf (instName)! = -1)

    {

    controls [instName] .visible = true;

    }

    on the other

    {

    controls [instName] .visible = false;

    }

    }

    }

    }

    }

    import:

    import flash.events.TransformGestureEvent;

  • Swipe vs slide please help.

    Hi am these bits of code and try tocombine them, but still no luck.

    All I'm trying to do is to get a smooth sliding effect to work on android.

    Any help is appreciated.

    See you soon

    P

    ---------------------------------------------------------------------

    import flash.events.MouseEvent;

    to import flash.geom.Point;

    import flash.events.Event;

    import flash.geom.Rectangle;

    Destination point: var = new focus();

    var dragging: Boolean = false;

    var speed: number = 3;

    offset: var = new Point focus(); our offset

    limits: var = new Rectangle Rectangle (0,0,stage.stageWidth,stage.stageHeight);

    obj.addEventListener (Event.ENTER_FRAME, followmouse);

    obj.addEventListener (MouseEvent.MOUSE_DOWN, startdrag);

    stage.addEventListener (MouseEvent.MOUSE_UP, stopdrag);

    function startdrag(e:MouseEvent):void {}

    offset.x = obj. MouseX * obj. ScaleX;   offset record (pt obj is slid

    offset.y = obj. MouseY * obj. ScaleY;

    move = true;

    }

    function stopdrag(e:MouseEvent):void {}

    displacement = false;

    }

    function followmouse(e:Event):void {}

    {if (dragging)}

    destination.x = MouseX;

    destination.y = MouseY;

    }

    -obj.x = (obj.x-(destination.x-offset.x))/speed;   apply the offset

    -obj.y = (obj.y-(destination.y-offset.y))/speed;

    if(obj.x>Bounds.Left) {}

    obj.x = Bounds.Left;

    }

    If (obj.x <-obj.width + bounds.right) {}

    obj.x = - obj.width + bounds.right;

    }

    if(obj.y>Bounds.Top) {}

    obj.y = Bounds.Top;

    }

    If (obj.y <-obj.height + bounds.bottom) {}

    obj.y = - obj.height + bounds.bottom;

    }

    }

    ----------------------------------------------------------------------

    Multitouch.inputMode = MultitouchInputMode.GESTURE;

    obj.addEventListener (TransformGestureEvent.GESTURE_SWIPE, onSwipe);

    function onSwipe(e:TransformGestureEvent):void

    {

    If (e.offsetX == 1)

    {

    }

    If (e.offsetX == - 1).

    {

    }

    }

    ----------------------------------------------------

    Here is the code for an application that I made for the iphone.  the client wanted to emulate the iphone scroll, throw, bounce:

    private function addListenersF (): void {}
    this.hospitalsPhysicians_mc.hitArea_mc.addEventListener (TouchEvent.TOUCH_TAP, toggleF, fals e, 0, true);
    this.listP.addEventListener(TouchEvent.TOUCH_BEGIN,listTouchBeginF,false,0,true);
    }
    private void listTouchBeginF(e:TouchEvent):void {}
    {if(this.listP.Height>This.mask_mc.) Height)}
    stage.addEventListener(TouchEvent.TOUCH_END,listTouchEndF,false,0,true);
    {if(!this.listP.cacheAsBitmap)}
    this.listP.cacheAsBitmap = true;
    }
    150 and 300 should allow to slide beyond listP and interpolation of return to the borders.
    dragRect.y = this.mask_mc.y - this.listP.height + this.mask_mc.height - 150;
    dragRect.height is this.listP.height - this.mask_mc.height + 300;.
    this.listP.startTouchDrag (e.touchPointID, false, dragRect);
    startDragY = this.listP.y;
    startDragTime = getTimer();
    this.listP.addEventListener(Event.ENTER_FRAME,listTouchMoveF,false,0,true);
    }
    }
    private void listTouchMoveF(e:Event):void {}
    startDragY = this.listP.y;
    startDragTime = getTimer();
    }
    private void listTouchEndF(e:TouchEvent):void {}
    stage.removeEventListener (TouchEvent.TOUCH_END, listTouchEndF, false);
    this.listP.removeEventListener (Event.ENTER_FRAME, listTouchMoveF, false);
    this.listP.stopTouchDrag (e.touchPointID);
    dragTime = getTimer () - startDragTime;
    predict the point of arrival, period.  If abs <500, converge="" slowly. ="" if="" abs="">900, converge quickly
    Speed = 1000 *(this.listP.y-startDragY)/dragTime;
               
    {if(Velocity>0)}
    lowerLimit = this.mask_mc.y, assigned in init()
    endY = Math.min (lowerLimit, this.listP.y + velocity);
    } ElseIf (speed<>
    this.listP.height changes according to expanded / contract titles
    upperLimit = this.mask_mc.y + this.mask_mc.height - this.listP.height;
    endY = Math.max (upperLimit, this.listP.y + velocity);
    } else {}
    Speed = 0;
    upperLimit = this.mask_mc.y + this.mask_mc.height - this.listP.height;
    endY = Math.min (lowerLimit, this.listP.y);
    endY = Math.max (upperLimit, endY);
    }
    trace (this.listP.y, endY, Velocity, upperLimit)
               
    If ((vélocité > = 0 && endY == lowerLimit) |) (speed<=0 &&="" endy="=upperLimit)">
    Duration = 1;
    TweenLite.to(this.listP,duration,{y:endY,ease:Quint.easeOut});)
    } else {}
    duration = (endY-this.listP.y)/velocity;
    TweenLite.to(this.listP,duration,{y:endY,ease:Quint.easeOut});)
    }
    }

  • Can't stop playing the sound.

    The problem is that I have a sound that plays inside a movieclip when the playhead passes a framework (inside the movieclip), this is controlled by an event listener:

    Multitouch.inputMode = MultitouchInputMode.GESTURE;

    stage.addEventListener (TransformGestureEvent.GESTURE_SWIPE, fl_SwipeToGoToNextPreviousFrame_4);

    function fl_SwipeToGoToNextPreviousFrame_4(event:TransformGestureEvent):void

    {

    if(Event.OffsetX == 1)

    {

    slipped right

    prevFrame();

    }

    ElseIf (event.offsetX == - 1).

    {

    slid left

    nextFrame();

    }

    }

    When the playhead in the maintime line, was an image before one containing said movieclip.
    swipe always causes the sound to play.


    I'm not sure why this happens and House to prevent it from happening

    Any suggestions would be greatly appreciated

    Thank you

    in the frame that contains your movieclip of journal, use:

    diary.addEventListener (Event.REMOVE_FROM_STAGE, removeF);

    function removeF(e:Event):void {}

    stage.removeEventListener (TransformGestureEvent.GESTURE_SWIPE, fl_SwipeToGoToNextPreviousFrame_4);

    }

  • Determine a diagonal move with MultitouchInputMode.GESTURE?

    How can I determine a diagonal move with MultitouchInputMode.GESTURE?

    Hello

    You calculate that it based on the sense of the offsetX and offsetY.

    Say you are listening to the TransformGestureEvent.GESTURE_SWIPE. offsetX indicates left/right-1 left and 1 right. offsetY indicate high-low with 1 for down and-1 for upward. So if it is of 1/offsetX and offsetY is 1, you went right down to the right.

    It depends on what you are trying to detect. See the documentation for the TransformGestureEvent and see if any of these events gives you the values you want.

    http://help.Adobe.com/en_US/FlashPlatform/reference/ActionScript/3/Flash/events/TransformG estureEvent.html

    If you need more in detail that you have to roll your own "gesture" by opting for the touch events monitoring and calculation in this way.

    iBrent

  • by scanning event management

    Hi all!

    I need assistance with slippery in my mobile project...

    O want to slide between the views. So I add addEventListener (TransformGestureEvent.GESTURE_SWIPE, onSwipe); in my view init function

    A it is OK. Its work!

    But, I also added < s:List > (horizontal) to see. And when I try scrolling (swipe) this list horizontally with your finger, I also drag/scroll my opinion to another!

    I understand that it's something with the propagation of events, but I don't know how to solve this problem. I try use removeEventListener (TransformGestureEvent.GESTURE_SWIPE, onSwipe) on navigator.activeView: discover when I startTouch list. No positive effect.

    So. I would be happy for any help.

    Hello

    To slide between the views, there is a new 'pageScrollingEnabled' to the list atttibute in Flex 4.6

    For more information, see the blog of Jason Flex:

    http://blogs.Adobe.com/jasonsj/2011/11/mobile-list-paging-with-page-indicator-skin.html

    For your example:

    -use addEventListener in method of viewActivate,

    -use removeListener in method viewDeactivate

    -the method of TransformGestureEvent.GESTURE_SWIPE,

    test the target and use event.preventDefault to cancel the event.

    -in the onSwipe isDefaultPrevented test method

    (in some cases, systemManager which redispatches a cancellable)

    version of an event)

    protected function onSwipe(event:TransformGestureEvent):void

    {

    If (event.isDefaultPrevented ()) return;

    ...

    And if you're problems, post a code snippet...

    Philippe

  • Change code Bitmap MovieClip code?

    Hello

    I am working on an app for iOS, where I want to load dynamically from the content of the library that contains the text and graphics inside different MovieClip.

    However, I have a problem, the code I have is for bitmap!

    How can I change to make it work for the MovieClip instead?

    I want to use the MovieClip instead of bitmap?

    You also want to use the MovieClip class instead of the class Sprite?

    Please help me
    Best regards
    Mikael (No.) Pro in AS3)

    This is the code:

    var mc:MovieClip = new MovieClip();
    addChild (mc);

    var sp:Sprite = new Sprite ();
    addChild (sp);

    for (var i: int = 1; i < 6; i ++)
    {
    Ref: var class = getDefinitionByName ("p" + i) in class;
    var bm:Bitmap = new Bitmap (new ref());
    sp.addChild (WB);
    BM.x = 768 * (i - 1);
    }

    var ind:int = 0;
    var currX:Number = 0;

    stage.addEventListener (Event.ENTER_FRAME, loop);
    sp.addEventListener (TransformGestureEvent.GESTURE_SWIPE, onSwipe);

    function onSwipe(e:TransformGestureEvent):void
    {
    If (e.offsetX == 1 & & ind > 0)
    {
    -IND;
    }

    If (e.offsetX ==-1 & & ind < 4)
    {
    IND ++;
    }
    }

    function loop(e:Event):void
    {
    currX += (ind * 768 - currX) * 0.120.
    sp.scrollRect = new Rectangle (currX, 0, 768, 1024);
    }

    I just answered your question.

    Why you send a link to a tutorial?

  • Pan gesture fires

    Can someone explain to me why my 'TransformGestureEvent.GESTURE_PAN' fires?

    All other gesture events are triggered.

    I find it a bit confusing

    Oh yes, I'm developing for all platforms but stable on a nexus S google phone

    package
    {
    import flash.display.Sprite;
    import flash.display.StageAlign;
    import flash.display.StageScaleMode;
    import flash.events.TransformGestureEvent;
    to import flash.geom.Point;
    import flash.ui.Multitouch;
    import flash.ui.MultitouchInputMode;

    SerializableAttribute public class PanTest extends Sprite
    {
    private var _target:Sprite;

    public void PanTest()
    {
    support autoOrients
    internship. Align = StageAlign.TOP_LEFT;
    stage.scaleMode = StageScaleMode.NO_SCALE;

    Multitouch.inputMode = MultitouchInputMode.GESTURE;

    _target = new Sprite();
    _target. Graphics.beginFill (0x99ff00);
    _target. Graphics.drawRect (-200, -200, 400, 400);
    _target. Transform.Matrix.TX = 200;
    _target. Transform.Matrix.Ty = 200;
    _target.x = stage.stageWidth / 2;
    _target.y = stage.stageHeight / 2;
    addChild (_target);

    If (Multitouch.supportsGestureEvents)
    {
    for each (var: string element in Multitouch.supportedGestures)
    {
    trace (Item)

    switch (POS)
    {
    case TransformGestureEvent.GESTURE_PAN:
    {
    _target.addEventListener (TransformGestureEvent.GESTURE_PAN, _gestureHandler);
    break;
    }
    case TransformGestureEvent.GESTURE_ROTATE:
    {
    _target.addEventListener (TransformGestureEvent.GESTURE_ROTATE, _gestureHandler);
    break;
    }
    case TransformGestureEvent.GESTURE_SWIPE:
    {
    _target.addEventListener (TransformGestureEvent.GESTURE_SWIPE, _gestureHandler);
    break;
    }
    case TransformGestureEvent.GESTURE_ZOOM:
    {
    _target.addEventListener (TransformGestureEvent.GESTURE_ZOOM, _gestureHandler);
    break;
    }
    }
    }
    }
    }

    protected function _gestureHandler(e:TransformGestureEvent):void
    {
    trace (e.type);

    Switch (e.type)
    {
    case TransformGestureEvent.GESTURE_PAN:
    {
    var prevPoint:Point = new Point (_target.x, _target.y);
    _target.x += e.offsetX * 3;
    _target.y += e.offsetY * 3;
    break;
    }
    case TransformGestureEvent.GESTURE_ROTATE:
    {
    _target.rotation += e.rotation;
    break;
    }
    case TransformGestureEvent.GESTURE_SWIPE:
    {

    break;
    }
    case TransformGestureEvent.GESTURE_ZOOM:
    {
    _target. ScaleX * = e.scaleX;
    _target. ScaleY * = e.scaleY;
    break;
    }
    }
    }
    }
    }

    Johan,

    I guess you checked using tracing instructions in the PAN switches block.

    How are your high-performance PAN gesture on the screen, I wanted to remind you that it is a two-finger gesture.

    You must use two fingers to the panorama of the sprite.

    -Pahup

  • TransformGestureEvent and TouchEvent

    Is it possible to use the TransformGestureEvent and the TouchEvents at the same time? Or perhaps one recommended for commutation of the Multitouch.inputMode?

    I saw this option in class of third party but without trying to enterpit the Gestuers of TouchEvents manually, I don't know what to do.

    Thank you

    D

    Hi Donald,.

    Failed to receive the two touch events and events the gesture at the time, but only one or the other based on the Multitouch.inputMode. Depending on your use case, you can either use key events and interpret as gestures when necessary or use mouse events and gestures events. Can you provide us with some details about your use case?

    Thank you

    Evtim

  • Pinch gesture scaled

    private function onGesturePinch(e:TransformGestureEvent):void{
                    var pinchMatrix:Matrix = this.transform.matrix;
                    var pinchPoint:Point = pinchMatrix.transformPoint(new Point((this.width/2), (this.height/2)));
                    pinchMatrix.translate(-pinchPoint.x/2, -pinchPoint.y/2);
                    pinchMatrix.scale(e.scaleX, e.scaleY);
                    pinchMatrix.translate(pinchPoint.x/2 , pinchPoint.y/2);
                    this.transform.matrix = pinchMatrix;
    }
    

    is there a better way to do this? I find that this method is very nervous and I lose the picture often. Does anyone have a beautifully clean and smooth to scale a Sprite using pinch without losing the image off-screen. This method is inside a .as class that extends the Sprite class, there is also a similar method for the movement of rotation in this class. Thank you!!!

    Keep a private in your class as attribute:

    private var delay_response_id: int = 0;

    Depending on your event, which received the pinch:

    If (this.delay_response_id > 0) clearTimeout() don't (this.delay_response_id);

    also hides the data needed for the late response

    This.delay_response_id = setTimeout (MyDelay, 500); 0.5 second delay.  Change as needed

    Then in your delayed function:

    private void MyDelay(): void

    {

    This.delay_response_id = 0; reset

    process cached information

    clear the cached information

    }

    Hope that helps.

Maybe you are looking for

  • Equium A60-157 will not power

    Hi people! Could someone offer a bit of expertise and tell me whether or not the series Equium A60 - 157 has a center pin in its socket? I need to know that my laptop doesn't have one and it will not power! I'm deeply frustrated because I paid at the

  • Problem on asynchronous call: façade Subvi is not pop up when it is called.

    Dear all, I'm new to LabVIEW, and this is the first time I try to use the asynchronous call. I'm using LabVIEW 2011. I want to build a directory for several screws, and it should enable users to open more than one of the screws at the same time press

  • Stop 0x0000001E Error

    Hi all I've tried everything I can think of, but I am not getting a BSOD Stop error. I post a picture of this. It has been ongoing for several months. I tried several solutions. I bring this to the community to see if anyone else has had this. I'm ru

  • BPEL blocked waiting for a response in a human task onMessage

    I want to run an invoke after each reception. I used the onTaskUpdated.My script has 4 approvers series. After the first 3, everything works fine and the invoke is executed correctly.After the last of them, the flow is stuck on the onMessage 'pending

  • Quick question on Notifcation Mailer - reply link

    Hi support them.I installed the sender of the notification successfully and the approver has receive notification by email.My Question is about the answer that is below the email notification=====Please click on one of the following choices to automa