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

Tags: Adobe AIR

Similar Questions

  • Pan gesture does not

    Hello

    Currently, I am working on the application of a gesture of pan on the image of a scroll pane component to allow the user to browse the whole picture simply by touching the image instead of using horizontal and vertical scrolling. However, it still seems to be moving the whole scrolling pane and not the image inside, below is part of the script.

    spImage = new ScrollPane();

    spImage.move (-220, -250);

    spImage.setSize (440,500);

    spImage.source = "Images/"+movieXML.title[_currentMovie].image+".jpg";

    spImage.addEventListener (TransformGestureEvent.GESTURE_PAN, onPan);

    private void onPan(event:TransformGestureEvent):void

    {

    this.x += event.offsetX;

    this.y += event.offsetY;

    }

    By using the above script, I can only move the pane scroll together and not the image inside, how can I apply for pan gesture on the content? Please advice.

    Kind regards

    Tan.

    Well well currently, it is obvious that you are moving the ScrollPane with the code you have there, you join the event GesturePan for the Scrollpane which is correct, but in the onPan method, you move this is the scrollpane itself once again, instead of using this, use

    spImage.verticalScrollPosition += event.offsetX;

    spImage.horizontalScrollPosition += event.offsetY;

    You should probably use a multiplier / factor to use the gesture of pan properly, it's a matter of trial and failure.

    See you soon

    Tiago

  • Navigation pane: gesture of slide and corn pages

    I use the NavigationPane to manage the transiction from one application Page to the other.

    I have two questions for you:

    (1) I would like to know if it is possible to disable the gesture of slide to "pop" or close the Page by dragging it from left to right.

    (2) it would be nice also to avoid the "pop" of the image when the gesture of the slide is active and I slide to a left-hand page. If I want to go back to the page on the right, I need to push it again in the Navigation pane. Is it possible to avoid this? For example, if I have a 3 page I go to the right page and then back to left pages no matter how many times I do it. How can I achieve this?

    Thanks in advance

    There's no reason you can't have a launch a thumb to the back of the image or for that matter have a "Forward" ActionItem, both are possible.

    Allows you to recognize the signal OnTouch (unfortunately it is not GestureHandler for it yet) and push the page when the shot is from right to left.

    Why do you want to avoid the pop?
    I understand you not wanting to destroy the page and keep in memory for faster loading, but there is little to gain from popping is not page, does that remove the battery of the navigationPane. Push and popping of pages has little impact on the effectiveness, it is actually adding or deleting a pointer to a list.

    If I were you I would implement some sort of caching so that as you walk in both directions between the pages you keep say 5 in memory with two part and the other the power of images and destroy the rest outside of this cache. When you move one way or the other you asynchronously create page two pages far in this direction. In this way, reduce you the memory requirements and keep speed high.

  • Y at - it a tip for Undo and Redo to work?

    I tried all possible ways to use two fingers to swipe back, but I can't get the cancellation or reinstatement for work on my iPad mini. Does anyone have any tips for this?

    The gesture is not easy to use and it is only available for cutting and selection in the content-aware fill then we actually disabled in our 1.0.1 update. We are the reworking in our next release.

    If you really want to try, keep your two fingers on the screen and quickly swipe left or right. Keep your fingers too long will turn the pan gesture. I hope this helps.

  • Touch gesture "pan two finger ' Photoshop cc 2015.1 does not

    Hello

    I use a wacom cintiq 24hd button and after I installed (upgrade) the latest version of photoshop, cc 2015.1, (Windows 8.1) a couple of touch gestures don't work as they should:

    Two fingers to pan and zoom (when using two fingers to or far away, to zoom in or out) works perfectly.

    The two fingers pan does not work: whenever I use this gesture (goes up, down, left or right) I work the photo/painting on shoots off the screen. I have to select the the hand icon and use the stylus to place it in the center of my screen;

    The two fingers of pan and rotation does not work.


    I have not had a problem using all these movements in photoshop before the recent update.


    Is that what I can do on my part that could solve these problems? If someone could help me with this, I appreciate it a lot.


    Thank you

    JerHopp

    Hi JerHopp,

    Try the following steps:

    1. create a Notepad and type:

    # Use WinTab

    UseSystemStylus 0

    Save it as a text file named PSUserConfig.txt

    2. Open Run command and type appdata, and press ENTER key

    3. go to the location:

    Roaming - Adobe - Adobe Photoshop CC2015 - Adobe Photoshop CC2015 settings

    4. move the file PSUserConfig.txt to the folder settings Adobe Photoshop CC 2015

    Kind regards

    Tanuj

  • Is the response of gesture Swipe on Kindle Fire really this bad?

    The example using the easiest shot of what I could find from http://www.tutorialsbyibrent.com/

    Flash CS5.5: iOS - Multitouch - GESTURE - Swipe

    Using CS5.5 and Air 2.6 we tried this on Kindle Fire. This isn't the most sensible thing I've seen.

    Frequently need to tap a little hard so he can drag, refusing drag in one way or another.

    Response of gesture Flash really is this bad on the Kindle fire?  Is it better on other mobile devices?

    Maybe it's the better way for AIR 3.2? Anyone has anything on android using blow and AIR 3.0 +?

    It is unrealistic to expect it to be as sensitive as the native, but this seems almost unusable.

    Mouse old plain does not respond as we would like to be. Tapping seems ok.

    Should we invest more time Flash/air or pass?

    Thanks in advance.

    Indeed, he adds some dimensions, but with a little technique, you'll running as smooth as can be expected. Don't forget between iPad1 and iPad2 the CPU and GPU have been greatly improved (simple A4 processor 512 MB of ram and 256 MB of ram to double A5s). The iPad3 at iPad2 uses double A5Xs and one GB of ram, but you never know because the retina display sucks almost every bit of extra horses. If you end up with a large screen but almost absolutely no noticeable speed improvement.

  • Mobile gesture Event - Pan Event (Problem)

    AS3-mobile

    I want to move my photo with one only finger not two fingers.
    coding be provided with multitouch feature to work but I need to move with one finger.

    Any solution for this. Need help.

    coding:

    Multitouch.inputMode = MultitouchInputMode.GESTURE;

    Picture.addEventListener (TransformGestureEvent.GESTURE_PAN, fl_PanHandler_2);

    function fl_PanHandler_2(event:TransformGestureEvent):void

    {

    event.currentTarget.x += event.offsetX;

    event.currentTarget.y += event.offsetY;

    }

    Use a touchevent, not transformgestureevent.

  • why I can't pan East/West in the Google spreadsheet

    Dear reader,

    I could not pan n/s or E/W in a Google spreadsheet. It worked fine in Safari. Google spreadsheet is active. I can change cells. It's a very small spreadsheet, 44 lines and 5 columns with any of the formulas.

    I was using Beta Version 27. I installed the Version 26 and the n/s now works fine. E/W does not work. If I try panoramic E/W has a few times he could suddenly jerk E/W a few times and then stops.

    I deleted the cache and cookies. No difference.

    I restarted in safe mode. No difference.

    As indicated, I reinstalled 26 and who sets the Pan n/s, but not the pan E/W.

    Any ideas or suggestions?

    John

    Dear reader,

    Fixed - on my Mac in system preferences > TrackPad > more gestures, I got the "between the pages" which allows "Scrolling left or right with two fingers" lit. When I turned so far, I could pan E/W in Google spreadsheets.

    John

  • Gesture of support?

    Y at - there no plans to put this feature in Firefox Android in the future? Already, it makes sense on my Firefox PC and could benefit from the user so much experience with the support of key on the mobile, because we have lost the ability to identify anything on the screen with the mouse.

    Web sites with touch events available to their implementation of a gesture based interface user is difficult.

    For example, lets say you were visiting a mapping site and used gestures to help you navigate. How the browser between the user pan from right to left on the site of the card or the gesture on the part of the return of browser action. These kinds of conflicts are difficult to implement actions.

    It is probably best left to extensions

  • ImageView and pan / zoom

    Hi all

    I'm in a situation where I need to use a control to display an image and it pan on the trail. Also this control will have to be able to zoom in the image to pinch, but I was informed that no event is pinch cascading far, so let's focus on the element of pan. When the user touches the ImageView (on contact) should be able to move when the finger moves. I know that ImageView does not support this feature, but what steps do I take to integrate it?

    Let's say I have loaded the image of a path and I have a QImage stored somewhere I used its data to display an Image in ImageView. How to apply view ImageView? Or if you can't, how can we establish an image control, which can pan (for now) and zoom (in the future)? Basically, I'm looking for an equivalent of Cascades of this example of feature Native called gestures: https://developer.blackberry.com/native/sampleapps/.

    I don't need all the features of this example. I need information how to move an image in a cascade control.

    Thanks in advance.

    Yes, you can place an item in a container smaller than the size of the element but the container must be done with scrolling (scrollMode: ScrollMode.Both) so that it knows to allow the biggest child element to exceed his limits.

    For the ferry, just take a look at the example of PullMyBeard, it shows how to listen for events from key and move an ImageView with tactile movement:

    https://developer.BlackBerry.com/Cascades/sampleapps/

    If you have problems of application please let us know.

  • Number with gestures. Am I missing something?

    Hi all, I was experimenting with the sample of gestures of https://github.com/blackberry/NDK-Samples/tree/ndk2/Gesture ... I wanted to do something when a tap gesture were found (some processing and registration for the file...)...

    I noticed that after the treatment, the gestures would stop working...

    I was able to recreate the problem simply by putting a 2 second delay in the section of the tap of the gestures of the Gesturs sample application standard callback function...  I am pasting the main.c below...

    I tried searching in the gesture API on delays documentation or any configuration of the time-out option, but could not find something... am I missing something? How can I recover when it arrives? (of course I could put the personalised treatment in another thread, but I don't need this way, and I don't see why it wouldn't work...). Anyone else having this problem?

    This is the code:

    /*
    * Copyright (c) 2011-2012 Research In Motion Limited.
    *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
    * You may obtain a copy of the License at
    *
    * http://www.apache.org/licenses/LICENSE-2.0
    *
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    * See the License for the specific language governing permissions and
    * limitations under the License.
    */
    
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    
    #include "input/screen_helpers.h"
    #include "gestures/double_tap.h"
    #include "gestures/pinch.h"
    #include "gestures/set.h"
    #include "gestures/swipe.h"
    #include "gestures/tap.h"
    #include "gestures/two_finger_pan.h"
    
    #define MIN_VIEWPORT_SIZE 128
    #define MAX_VIEWPORT_SIZE 4096
    screen_context_t screen_ctx;
    screen_window_t screen_win;
    static bool shutdown;
    struct gestures_set * set;
    const char* img_path = "app/native/wallpaper.jpg"; /* Relative path to image asset */
    int viewport_pos[2] = { 0, 0 };
    int viewport_size[2] = { 0, 0 };
    int last_touch[2] = { 0, 0 };
    
    /**
     * The callback invoked when a gesture is recognized or updated.
     */
    void
    gesture_callback(gesture_base_t* gesture, mtouch_event_t* event, void* param, int async)
    {
        if (async) {
            fprintf(stderr,"[async] ");
        }
        switch (gesture->type) {
            case GESTURE_TWO_FINGER_PAN: {
                gesture_tfpan_t* tfpan = (gesture_tfpan_t*)gesture;
                fprintf(stderr,"Two finger pan: %d, %d", (tfpan->last_centroid.x - tfpan->centroid.x), (tfpan->last_centroid.y - tfpan->centroid.y));
                if (tfpan->last_centroid.x && tfpan->last_centroid.y) {
                    viewport_pos[0] += (tfpan->last_centroid.x - tfpan->centroid.x) >> 1;
                    viewport_pos[1] += (tfpan->last_centroid.y - tfpan->centroid.y) >> 1;
                }
                break;
            }
            case GESTURE_PINCH: {
                gesture_pinch_t* pinch = (gesture_pinch_t*)gesture;
                fprintf(stderr,"Pinch %d, %d", (pinch->last_distance.x - pinch->distance.x), (pinch->last_distance.y - pinch->distance.y));
    
                int dist_x = pinch->distance.x;
                int dist_y = pinch->distance.y;
                int last_dist_x = pinch->last_distance.x;
                int last_dist_y = pinch->last_distance.y;
    
                int reldist = sqrt((dist_x)*(dist_x) + (dist_y)*(dist_y));
                int last_reldist = sqrt((last_dist_x)*(last_dist_x) + (last_dist_y)*(last_dist_y));
    
                if (reldist && last_reldist) {
                    viewport_size[0] += (last_reldist - reldist) >> 1;
                    viewport_size[1] += (last_reldist - reldist) >> 1;
    
                    /* Size restrictions */
                    if (viewport_size[0] < MIN_VIEWPORT_SIZE) {
                        viewport_size[0] = MIN_VIEWPORT_SIZE;
                    } else if (viewport_size[0] > MAX_VIEWPORT_SIZE) {
                        viewport_size[0] = MAX_VIEWPORT_SIZE;
                    }
                    if (viewport_size[1] < MIN_VIEWPORT_SIZE) {
                        viewport_size[1] = MIN_VIEWPORT_SIZE;
                    } else if (viewport_size[1] > MAX_VIEWPORT_SIZE) {
                        viewport_size[1] = MAX_VIEWPORT_SIZE;
                    }
    
                    /* Zoom into center of image */
                    if (viewport_size[0] > MIN_VIEWPORT_SIZE && viewport_size[1] > MIN_VIEWPORT_SIZE &&
                            viewport_size[0] < MAX_VIEWPORT_SIZE && viewport_size[1] < MAX_VIEWPORT_SIZE) {
                        viewport_pos[0] -= (last_reldist - reldist) >> 2;
                        viewport_pos[1] -= (last_reldist - reldist) >> 2;
                    }
                }
                break;
            }
            case GESTURE_TAP: {
                gesture_tap_t* tap = (gesture_tap_t*)gesture;
                fprintf(stderr,"Tap x:%d y:%d delay 2000",tap->touch_coords.x,tap->touch_coords.y);
                // *** 2 sec delay to reproduce issue ***
                delay(2000);
                break;
            }
            case GESTURE_DOUBLE_TAP: {
                gesture_tap_t* d_tap = (gesture_tap_t*)gesture;
                fprintf(stderr,"Double tap x:%d y:%d", d_tap->touch_coords.x, d_tap->touch_coords.y);
                break;
            }
            default: {
                fprintf(stderr,"Unknown Gesture");
                break;
            }
        }
        fprintf(stderr,"\n");
    }
    
    /**
     * Initialize the gestures sets
     */
    static void
    init_gestures()
    {
        gesture_tap_t* tap;
        gesture_double_tap_t* double_tap;
        set = gestures_set_alloc();
        if (NULL != set) {
            tap = tap_gesture_alloc(NULL, gesture_callback, set);
            double_tap = double_tap_gesture_alloc(NULL, gesture_callback, set);
            tfpan_gesture_alloc(NULL, gesture_callback, set);
            pinch_gesture_alloc(NULL, gesture_callback, set);
        } else {
            fprintf(stderr, "Failed to allocate gestures set\n");
        }
    }
    
    static void
    gestures_cleanup()
    {
        if (NULL != set) {
            gestures_set_free(set);
            set = NULL;
        }
    }
    
    static void
    handle_screen_event(bps_event_t *event)
    {
        int screen_val, rc;
    
        screen_event_t screen_event = screen_event_get_event(event);
        mtouch_event_t mtouch_event;
        rc = screen_get_event_property_iv(screen_event, SCREEN_PROPERTY_TYPE, &screen_val);
        if(screen_val == SCREEN_EVENT_MTOUCH_TOUCH || screen_val == SCREEN_EVENT_MTOUCH_MOVE || screen_val == SCREEN_EVENT_MTOUCH_RELEASE) {
            rc = screen_get_mtouch_event(screen_event, &mtouch_event, 0);
            if (rc) {
                fprintf(stderr, "Error: failed to get mtouch event\n");
            }
            rc = gestures_set_process_event(set, &mtouch_event, NULL);
    
            /* No gesture detected, treat as pan. */
            if (!rc) {
                if (mtouch_event.contact_id == 0) {
                    if(last_touch[0] && last_touch[1]) {
                        fprintf(stderr,"Pan %d %d\n",(last_touch[0] - mtouch_event.x),(last_touch[1] - mtouch_event.y));
                        viewport_pos[0] += (last_touch[0] - mtouch_event.x) >> 1;
                        viewport_pos[1] += (last_touch[1] - mtouch_event.y) >> 1;
                    }
                    last_touch[0] = mtouch_event.x;
                    last_touch[1] = mtouch_event.y;
                }
            }
            if (screen_val == SCREEN_EVENT_MTOUCH_RELEASE) {
                last_touch[0] = 0;
                last_touch[1] = 0;
            }
        }
    }
    
    static void
    handle_navigator_event(bps_event_t *event) {
        switch (bps_event_get_code(event)) {
        case NAVIGATOR_EXIT:
            shutdown = true;
            break;
        }
    }
    
    static void
    handle_events()
    {
        int rc, domain;
        bool has_events = true;
    
        while(has_events) {
            bps_event_t *event = NULL;
            rc = bps_get_event(&event, 50);
            assert(rc == BPS_SUCCESS);
            if (event) {
                domain = bps_event_get_domain(event);
                if (domain == navigator_get_domain()) {
                    handle_navigator_event(event);
                } else if (domain == screen_get_domain()) {
                    handle_screen_event(event);
                    /* Re-draw the screen after a screen event */
                    screen_set_window_property_iv(screen_win, SCREEN_PROPERTY_SOURCE_POSITION , viewport_pos);
                    screen_set_window_property_iv(screen_win, SCREEN_PROPERTY_SOURCE_SIZE , viewport_size);
                    screen_flush_context(screen_ctx,0);
                }
            } else {
                has_events = false;
            }
    
        }
    }
    
    static int decode_setup(uintptr_t data, img_t *img, unsigned flags)
    {
        screen_window_t screen_win = (screen_window_t)data;
        screen_buffer_t screen_buf;
        int size[2];
    
        size[0] = img->w;
        size[1] = img->h;
        screen_set_window_property_iv(screen_win, SCREEN_PROPERTY_BUFFER_SIZE, size);
        screen_create_window_buffers(screen_win, 1);
    
        screen_get_window_property_pv(screen_win, SCREEN_PROPERTY_RENDER_BUFFERS, (void **)&screen_buf);
        screen_get_buffer_property_pv(screen_buf, SCREEN_PROPERTY_POINTER, (void **)&img->access.direct.data);
        screen_get_buffer_property_iv(screen_buf, SCREEN_PROPERTY_STRIDE, (int *)&img->access.direct.stride);
    
        img->flags |= IMG_DIRECT;
        return IMG_ERR_OK;
    }
    
    static void decode_abort(uintptr_t data, img_t *img)
    {
        screen_window_t screen_win = (screen_window_t)data;
        screen_destroy_window_buffers(screen_win);
    }
    
    int
    load_image(screen_window_t screen_win, const char *path)
    {
        img_decode_callouts_t callouts;
        img_lib_t ilib = NULL;
        img_t img;
        int rc;
    
        rc = img_lib_attach(&ilib);
        if (rc != IMG_ERR_OK) {
            return -1;
        }
    
        memset(&img, 0, sizeof(img));
        img.flags |= IMG_FORMAT;
        img.format = IMG_FMT_PKLE_XRGB8888;
    
        memset(&callouts, 0, sizeof(callouts));
        callouts.setup_f = decode_setup;
        callouts.abort_f = decode_abort;
        callouts.data = (uintptr_t)screen_win;
    
        rc = img_load_file(ilib, path, &callouts, &img);
        img_lib_detach(ilib);
    
        return rc == IMG_ERR_OK ? 0 : -1;
    }
    
    int
    main(int argc, char **argv)
    {
        const int usage = SCREEN_USAGE_WRITE;
    
        screen_buffer_t screen_buf = NULL;
        int rect[4] = { 0, 0, 0, 0 };
    
        /* Setup the window */
        screen_create_context(&screen_ctx, 0);
        screen_create_window(&screen_win, screen_ctx);
        screen_set_window_property_iv(screen_win, SCREEN_PROPERTY_USAGE, &usage);
    
        load_image(screen_win, img_path);
    
        screen_get_window_property_pv(screen_win, SCREEN_PROPERTY_RENDER_BUFFERS, (void **)&screen_buf);
        screen_get_window_property_iv(screen_win, SCREEN_PROPERTY_BUFFER_SIZE, rect+2);
        viewport_size[0] = rect[2];
        viewport_size[1] = rect[3];
        screen_set_window_property_iv(screen_win, SCREEN_PROPERTY_SOURCE_SIZE , viewport_size);
    
        screen_post_window(screen_win, screen_buf, 1, rect, 0);
    
        init_gestures();
    
        /* Signal bps library that navigator and screen events will be requested */
        bps_initialize();
        screen_request_events(screen_ctx);
        navigator_request_events(0);
    
        while (!shutdown) {
            /* Handle user input */
            handle_events();
        }
    
        /* Clean up */
        gestures_cleanup();
        screen_stop_events(screen_ctx);
        bps_shutdown();
        screen_destroy_window(screen_win);
        screen_destroy_context(screen_ctx);
        return 0;
    }
    

    Yes, when I run the code above I get the same problem.  It seems that the two finger gestures and pinching are fly events and not 'fault', so that it goes to the tap gesture.  If I rearrange the gesture_allocs to this

    _tfpan = tfpan_gesture_alloc (& tfparams, cb, _gest_set);
    _pinch = pinch_gesture_alloc (& pinparams, cb, _gest_set);
    _double_tap = double_tap_gesture_alloc (& dtparams, cb, _gest_set);
    _tap = tap_gesture_alloc (& tparams, cb, _gest_set);

    This works.  But the double tap does not work, probably because it takes 2 pressures, and to know that you have only 1 tap must wait or get an idle screen event.  In this case, I guess you could buffer events and use gestures_set_process_event_list with the functions in event_list.h

    https://developer.BlackBerry.com/native/reference/BB10/com.QNX.doc.gestures.lib_ref/topic/about_even...

    In addition, time of the event is the time of the real event, not when you have received the event with bps_get_event.  Any delay should not affect the treatment of the gesture.

  • Scroll in the pane to scroll pane

    Hi all

    I'm trying to implement a user interface in which a horizontal ScrollPane behaves something like the iPhone (the one with all the app icons) home screen.  When a smear user right or left, the screen moves in the appropriate direction, snapping to the appropriate 'page'.

    This worked pretty well, but the first view must have a vertical ScrollPane inside.  If the user left or right moves the view has pass, but if the user slides up or down, the view remains the same - on the first page of scrolling pane scrolls right in the appropriate direction.  As soon as I added the second ScrollPane, everything stopped working.  Then, I made the internal ScrollPane has been to launch the ScrollEvent.SCROLL_BEGIN and ScrollEvent.SCROLL_END events, and now the part slam and scrolling, but very erratically.  I'm quite frustrated, I was wondering if someone could give me a hand here.

    Here's what I mean:

    var scroller:ScrollPane;
    var containerMain:Container;
    
    var containerHome:Container;
    var container2:Container;
    var container3:Container;
    
    function ContentSlider(){
    ...
    //configure containerMain, containerHome, container2, container3, etc.
    ...
    var v:ViewHome = new ViewHome();
    configureScroller(v);
    containerHome.addChild(v);  
    
    containerMain.addChild(containerHome);
    containerMain.addChild(container2);
    containerMain.addChild(container3);
    numPanes=3;
    
    //1024 * number of views
    containerMain.setSize(1024*3,600);
    
    scroller.setScrollContent(containerMain);
    addChild(scroller)
    }
    
            private function onScrollBegin(ev:ScrollEvent):void{
                originalScrollX=scroller.scrollX;
            }
    
            var i:int=0;
            var oldDelta:int=0;
            private function onScrollEnd(ev:ScrollEvent):void{
                trace(i.toString() + ": "+ev.currentTarget);
                i++;
                if(ev.currentTarget!=this.scroller)
                    return;
    
                var delta:int = originalScrollX - scroller.scrollX;
                if(oldDelta==delta)
                    return;
    
                oldDelta=delta;
    
                var scrollTo:int=0;
                var scrollTime:Number = 0.4;
    
                if(delta >1024)
                    delta=1024;
    
                if(delta<-1024)
                    delta=-1024;
    
                l2.text=delta.toString();
    
                //snap to previous view (to the left)
                if( delta > this.SCROLL_THRESHOLD ||
                    ( (0<(delta*-1)) && (delta*-1) this.SCROLL_THRESHOLD){
                    selectedIndex++;
                    if(selectedIndex>numPanes-1)
                        selectedIndex=numPanes-1;
                }
                scrollTo = selectedIndex*1024;
                trace("delta: " + delta);
                trace("scroll to: " + scrollTo.toString());
                trace("selected index: " + selectedIndex.toString());
                //meat and potatoes:
                Tweener.addTween(scroller,{scrollX:scrollTo,time:scrollTime,transition:"linear"});
            }
    

    And in the other class (ViewHome), I have a lot of Visual elements, one of them being the vertical ScrollPane.  Everything I have there are

    scrollerVertical.addEventListener(ScrollEvent.SCROLL_BEGIN,f);
                scrollerVertical.addEventListener(ScrollEvent.SCROLL_END,f);
                scrollerVertical.addEventListener(ScrollEvent.SCROLL_MOVE,f);
    
    private function f(ev:ScrollEvent):void{
                this.dispatchEvent(ev);
            }
    

    Hey cyangreen,

    Yes, I came across the same problem some time. I couldn't find a solution for this. When you have a scrollpane in a scroll pane, strange things begin to happen. I feel (from what I've read and seen) it's because the ScrollPane uses the position of the mouse in the scene. also the fact that the scrollpane receives apparently even mousedown events when there is an object on top of it he receives first. the only thing I can think is waiting until we have Swipe gestures available to use in the Simulator. hope that sheds some light. Good luck!

  • How to turn off the preview pane in the mail application

    Is it possible to close/hide or resize the preview pane in the mail application?

    It looks like a natural option to have, and I can't believe he hasn't. Anyone know the magic gesture or setting?

    Hi Mmichtch,

    Thanks for posting in the Microsoft Community.

    Unfortunately, there is no option to close/hide or resize the preview pane in the Mail application, because it is by default design.

    If you want to provide feedback on the same, then proceed as follows:

    Open Mail App press on Windows + C logo , then select your comments.

    If you need further assistance, please answer and we will be happy to help you.

  • Effect of fire damage?

    Hello

    I would like to get an effect that transforms the images of a normal room in a room fire damaged. Dirty walls, wallpaper burned and so on.

    Advice on how to achieve this, anyone?

    JAke

    If you ask how to do matte paintings of fire to overlay on your images, then you will need to go into Photoshop and add a layer, and then start painting. I can't tell you how to do this with a plugin or effect because you need create the image with a brush or take pictures of fire damage and extract the burned parts. For example, if you have a door frame that you want to look like a piece of burned wood, so you might very well a picture of a piece of burned wood and superimpose this image in your photo then crop, clone, distort and resize it so that it can look the way you want it to look. If you have a wall that you want to have burning and smoking patterns, wallpaper or blistering of paint wet then if you have not the skills to draw or paint that those you must find an image that is close to your original in size and scale and cut out the part you want to overlay, and add it to the stage. These overlays are to be large enough to cover the original film if the camera moves. A trucking shot (left right camera Move) is easier to work that a pan due to changes in perspective and a Pan and Zoom is even more difficult.

    For example, you could take this image:

    And combine them in Photoshop with a still image from your video like this using the scale, stretch, masking to get to this:

    You can even use similar techniques entirely in After Effects. As I said, what you use depends entirely on the shot you have and what you want to do. I just took the part of the right wall of the door until the switch, he reduced and hidden to fit the part of the wall with the damage, then change the blending mode to multiply.

  • How to get the coordinates of a Swipe gesture?

    Hi guys! I build a game similar to Fruit Ninja and recently, I encountered the following problem: How can I access the points of contact of a cause of event drag as you now to tear a piece of fruit, I need to know if you hit points are same as the location of the fruit.

    So, basically, it's something like:

    If {(Swipe.x is fruit.x)

    Destroyfruit();

    }

    So is it possible to understand the coordinates suddenly?

    Thank you

    Gestures have phases. Shot has a begin and end and not raise any events outside of those. You won't be able to get the coordinates to start drag and at the end. Don't use no gestures, use regular events of Touch with stageX and stageY (or localX and localY if limited to a certain area). These events go off quickly and continuously. You can simplify it by listening to just TouchEvent.TOUCH_MOVE because it fires so quickly.

Maybe you are looking for

  • Problem of Safari bookmarks

    Safari version 9.0.3, El Capitan 10.11.3 Earlier today, I moved a folder (named Music Making) in my favorites, but then when I opened it in its new location all the bookmarks that were in the folder disappeared. To recover bookmarks, I replaced the S

  • My Age of Mythology Titans not connect to ESO

    I'm new and I hope this is the right place to post this.As I have said that my Titans game is on the Frits. I go online and try to connect and I hit the OK and it said something about not being ESO is not able to connect and it says something about p

  • Question micro

    I have the Vixia RF52 which is used to record my religious services. Internal microphone (VERY sensitve!) picks up the cough, sqweaky chairs and everthing else. What I need to know is if I plug the camers our sound system, the internal microphone is

  • Factory restore process is stuck at 0% of the installation of programs

    Original title : Computer problems my computer is not usable at the moment am using another computer, I have a sony vaio FW series, I wanted to finish restoring my computer so when turn on I pressed F10 to open the vaio recovery center that was click

  • [Launch the Application in signal NFC]

    Hi allFirst of all, if the device is activated and unlocked then NFC works fine now. However, if the device is locked then the NFC tag is not detected (and the app is not running). It might be that applications cannot be launched when the device is l