Event MOUSE_MOVE on PlayBook

Hi guys,.

I know that this has already been mentioned in the forum but I want to make sure that the MOUSE_MOVE event is fully supported by the PlayBook.

I am simulating behavior dragging 'customized' by using this kind of mouseEvent and I would like to know if someone has implemented this. I see in the Simulator, it works very well.

Thank you

Of course it is supported, why not?  I don't remember that threads saying that it could not be.

The thing is, MOUSE_MOVE events are generated at a high rate.  In the Simulator, it's at least 100 Hz... way more than you need if you just drag.

In such a case, you're probably better off (if the standard startDrag() stuff is not good for you) adjustment / clears a flag to MOUSE_DOWN/MOUSE_UP and in an ENTER_FRAME handler (which takes place in your frameRate) you must manage dragging stuff if the flag is set.

(Also best to add/remove this enterFrame handler when you drag not, if you do not have another purpose for her.)

Tags: BlackBerry Developers

Similar Questions

  • Events of touch PlayBook does not

    The events of button on my app works perfectly on the PlayBook Ripple Simulator but does not work on the PlayBook. Here is the code I have applied. Anyone know why?

    recX var = 400;

    var _origPos = - 1;

    try {}
    document.ontouchstart = startTouch;
    document.ontouchend = endTouch;
    } catch (err) {}
    Alert ('error' + err.description);
    }

    function startTouch (e) {}
    _origPos = e.screenX;
    }

    function endTouch (e) {}
    If (_origPos <= 630="" &&="" recx="">0) {}
    recX is recX - 0;.
    } else
    If (_origPos > = 631 & recX)< 800)="">
    recX is recX + 0.;
    }
    }

    Remote Web Inspector to identify what is happening on the live webcam device with your code.  My guess is that this is the problem:

    function startTouch(e) {
    _origPos = e.screenX;
    }
    

    Suggests also making reference to the following example shows how to develop tactile events PlayBook: https://github.com/blackberry/WebWorks-Samples/blob/master/kitchenSink/js/browser/touch.js

    Example:

    function doTouchStart(event) {
        var touchEvent = event.changedTouches[0];
        var x = touchEvent.pageX;
        var y = touchEvent.pageY;
    }
    
    document.addEventListener("touchstart",  doTouchStart,  false);
    
  • blackberry.app.event.onExit () on PlayBook?

    Someone has an example of work for blackberry.app.event.onExit () on the PlayBook and better to post on the forum? Thank you.

    This method is not supported on the PlayBook.

    The WebWorks SDK for Tablet OS uses AIR to ensure its integration of device at a lower level.  AIR does not currently have a method "exit application", so therefore, nor does WebWorks for Tablet OS.

  • MOUSE_OVER and MOUSE_MOVE events.

    Which may explain why dispathces event MOUSE_MOVE before MOUSE_OVER event distributing?

    a passage from the mouse no shipping except if the mouse moves over is not to the position.  so it has to go first.

  • Event when the application closes

    Hi *.

    is there an event when the PlayBook application is about to close? I would like to save at this time where the configuration etc.

    Not that I know of.  It will be an event at the level of the AIR that is triggered when this problem occurs, and I do not think that such an event is currently on the Tablet OS.

  • How to make an object follow the mouseX when clicked on

    How to make an object follow the mouseX if clicked? Help, please.

    You should think it through - your code does not match your very simple explanation of what you say, it should do so, and it should... click an element and follow the mouse.

    A game loop (ENTER_FRAME) could work, but in this case it wastes unnecessary treatment if the mouse does not move.  And in your code example, it does not expect the clicks.

    Use a MOUSE_MOVE instead of an ENTER_FRAME event listener.  Inside of the event by clicking on the handler function is where you must be defined the MOUSE_MOVE listener.  The MOUSE_MOVE listener Manager is where you assign rock1Cnt.x = mouseX.

    public void Main (): void {}

    rock1Cnt.addEventListener (MouseEvent.CLICK, mouseClickHandler);

    }

    private void mouseClickHandler(e:MouseEvent):void {}

    stage.addEventListener (Event.MOUSE_MOVE, followMouse);

    }

    private void followMouse(e:MouseEvent):void {}

    rock1Cnt.x = mouseX

    }

  • problem when switching rooms to spark but does not exist in the namespace mx?

    I have a Flex SDK 4.0 application that I declared with < s:Application.  In this application, I have 2 rooms, which include two ConnectSession different associated to each as separate from the Pod with of shareID separate for each. (didn't the overlap of two rooms).  I have also 2 buttons that switch between room1 and libre2 when the user clicks on buttons.

    My problem is that the use of the < s:Application statement for my application... then transition from libre2 to room1 (transition room1 to the libre2 works very well), gives me this error:

    TypeError: Error #1034: Type coercion failed: cannot convert studygroups2@343f0a1 to mx.core.Application.

    to com.adobe.rtc.collaboration::SharedCursorPane/removeMyEventListeners() [C:\work\branches\c onnect\1004\cocomoPlayer10\src\com\adobe\rtc\collaboration\SharedCursorPane.as:477]

    to com.adobe.rtc.collaboration::SharedCursorPane/onSynchronizationChange() [C:\work\branches\ connect\1004\cocomoPlayer10\src\com\adobe\rtc\collaboration\SharedCursorPane.as:538]

    to::EventDispatcher/dispatchEventFunction() flash.events

    to::EventDispatcher/dispatchEvent() flash.events

    to com.adobe.rtc.sharedModel::CollectionNode/http://www.adobe.com/2006/connect/cocomo/messaging/internal:setIsSynchronized ([C:\work\b ranches\connect\1004\cocomoPlayer10\src\com\adobe\rtc\sharedModel\CollectionNode.as:683])

    to com.adobe.rtc.messaging.manager::MessageManager/onDisconnect() [C:\work\branches\connect\1 004\cocomoPlayer10\src\com\adobe\rtc\messaging\manager\MessageManager.as:813]

    to::EventDispatcher/dispatchEventFunction() flash.events

    to::EventDispatcher/dispatchEvent() flash.events

    to com.adobe.rtc.session.managers::SessionManagerBase/http://www.adobe.com/2006/connect/cocomo/session/internal: disconnect () [C:\work\branches\c onnect\1004\cocomoPlayer10\src\com\adobe\rtc\session\managers\SessionManagerBase.as:112]

    to com.adobe.rtc.session.managers::SessionManagerFMS/onFmsConnectorDisconnect() [C:\work\bran ches\connect\1004\cocomoPlayer10\src\com\adobe\rtc\session\managers\SessionManagerFMS.as:2 50]

    to::EventDispatcher/dispatchEventFunction() flash.events

    to::EventDispatcher/dispatchEvent() flash.events

    to com.adobe.rtc.session.sessionClasses::FMSConnector/disconnect() [C:\work\branches\connect\ 1004\cocomoPlayer10\src\com\adobe\rtc\session\sessionClasses\FMSConnector.as:393]

    to com.adobe.rtc.session.managers::SessionManagerFMS/http://www.adobe.com/2006/connect/cocomo/session/internal:logout ([C:\work\branches\conne ct\1004\cocomoPlayer10\src\com\adobe\rtc\session\managers\SessionManagerFMS.as:314])

    to com.adobe.rtc.session.managers::SessionManagerAdobeHostedServices/http://www.adobe.com/2006/connect/cocomo/session/internal:logout [C:\work\branches\conne ct\1004\cocomoPlayer10\src\com\adobe\rtc\session\managers\SessionManagerAdobeHostedService s.as:139])

    to com.adobe.rtc.session::ConnectSession/logout() [C:\work\branches\connect\1004\cocomoPlayer 10\src\com\adobe\rtc\session\ConnectSession.as:442]

    to com.adobe.rtc.session::ConnectSessionContainer/logout() [C:\work\branches\connect\1004\coc omoPlayer10\src\com\adobe\rtc\session\ConnectSessionContainer.as:267]

    to XXXXX / goGlobal () [C:\Users\Rees\Adobe Flash Builder 4\XXXXX\src\XXXXX.mxml:50]

    to XXXXX / ___XXXXX_Button2_click [C:\Users\XXXXX\Adobe Flash Builder 4\XXXXX\src\XXXXX.mxml:105])

    However, when I change the application to < mx:Application and then attempted the move again... BACK to room1 room2... everything works FINE!  It's maybe a simple question then please nu =).  Can someone tell me why I'm getting this question with the spark and how to fix it so I CAN use spark as my application namespace?  Thanks in advance!

    Wow, that's an interesting - feel that the sharedCursorPane has

    some difficult requirement that the base App's mx (this isn't terribly

    surprising, considering it was built with mx components, but it is still

    a bug). You can link against the source code (provided for player 10 now!)

    and change this line in sharedCursorPane:

    From:

    Request (mx.core.Application.application).stage.removeEventListener (mouse

    Event.MOUSE_MOVE, onMouseMove);

    TO:

    stage.removeEventListener (MouseEvent.MOUSE_MOVE, onMouseMove);

    and see if it works for you? I can't honestly say why we use the

    a line that was there... It is possible, that it's a work around for another

    issue. In any case, if you wouldn't mind being the Guinea pig for this one, we

    can get to the bottom of it.

    Thank you!

    Nigel

  • event KeyUp fails on Playbook OS version 2.0.1.358

    I have a simple text box that I apply an event handler for the keyup event on. But for some reason any the keyup event never fires. In my view, it was a problem with the old OS for phones and this event, but is there a problem with the OS playbook and this event?

    Yes, we use an event handler that we give to the text box. But I found that my problem was the predictive text function. Once, I turned out of the code everything worked as expected.

  • AddEventListener Webworks Javascript PlayBook for mouse/touch events

    I am writing an app for the Playbook using Webworks BB. Inside the application, I have a few items 'div' that users can grab and move them. I implemented it and tested on the desktop browser and it works very well. But I have a few questions about the Playbook:

    For some reason I'm not able to get the mouse/touch events... Here is a small code snippet:

    ....

    ....

    OK trouvé un woraround à ce problème en utilisant : http://ross.posterous.com/2008/08/19/iphone-touch-events-in-javascript

  • I need opposite a Mouse_Move event

    Hi people,

    I'm back from months hard work fo

    So, let me explain my problem: I need to send an event object when the user stops moving the mouse cursor. In the poor words, I need the exatly in front of a Mouse_Move event. Is there a solution or should I create an event with the EventDispatcher class?

    If you have a document class, you can add the following text:

    package {}
       
    import flash.events.Event;
    import flash.events.TimerEvent;
    import flash.events.MouseEvent;
    import flash.display.MovieClip;
    import flash.utils.Timer;
       
    SerializableAttribute public class Main extends MovieClip {}
           
            var idleTime:uint = 1000;  Set the desired value
    var idleEvent:Event = new Event ("IDLE_EVENT");
    var: timer = new Timer(idleTime,0);
           
    function Main() {}
    timer.addEventListener (TimerEvent.TIMER, dispatchEventF);
    Timer.Start ();
    stage.addEventListener (MouseEvent.MOUSE_MOVE, resetF);
    }
           
    private void dispatchEventF(e:TimerEvent) {}
    dispatchEvent (idleEvent);
    }
    private void resetF(e:MouseEvent) {}
    Timer.Reset ();
    Timer.Start ();
    }
           
    }
    }

    and you can add a listener to your main timeline or class for the "IDLE_EVENT".

  • menu touch event fired several times on the PlayBook

    Hello

    I see a problem on my Tablet (OS 2.0) that I don't see in the 2.0.0 Simulator. I have a menu bar that has two buttons: "export" and "import". When I click on the button "import" on my tablet, it triggers the method linked five times. In the Simulator, it does raise the method once. Any ideas on what could be the cause?

    I use this code to link the method:

            $('#buttonImport').click(function (evt)
            {
                menuImport();
            }); // end .click
    

    Here is the code of the method itself:

    function menuImport()
    {
        hideMenuBar();
        var oOptions = {
            title : "Confirmation",
            size : blackberry.ui.dialog.SIZE_SMALL,
            position : blackberry.ui.dialog.CENTER
        };
        var iConfirm = blackberry.ui.dialog.standardAskAsync("Do you want to overwrite all current data?",
                                                             blackberry.ui.dialog.D_YES_NO,
                                                             function (index)
                                                            {
                                                                if (index == 0)
                                                                {
                                                                    dbChecklistOpen.importDatabase();
                                                                }; // end if
                                                            },
                                                            oOptions); // end customAskAsync
    }; // end menuImport()
    

    Any help would be appreciated.

    Thank you

    I just figured that it is not a problem of "event-fire. It is a problem of menu display. When I slide down, the menu is not displayed correctly. I had spent five times already before the menu that is displayed. Then when I hit the button, he shot all five instances of the button.

    I'll close this thread and reformulate my description of the problem in a new thread.

    Thank you

  • not pulling - click event button position: fixed - 2.0 Playbook

    I have a fixed position "back" button in my application that triggers not when scrolling to the bottom of the screen.

    Here is the code for the button:


    When I scroll the screen to the top, the button triggers without problem. However, if the screen scrolls down at all, the button's click event will not occur.

    I've traced the events Web Inspector and a click event fires when I click the button. However, it does not actually draw the method that I've linked to the click event of the button. Once again, if I scroll the screen to the top, the button click fires very well.

    I must emphasize that the button is displayed correctly at all times. He remains in a fixed position of 5px to the right side of the screen, even when scrolling of the window down. If the button is visible at any time. It's just that when I scroll nothing happens if I click on the button.

    Looks like a bug with WebWorks. If anyone can confirm?

    Thank you

    Thanks for the suggestion ignites.

    I found that this was due to my own bug. It was a problem with z-index. I increased the z-index of the button, and it solved the problem. The button must have been in conflict with lowest elements of the page, but it was very well at the top of the page.

    Thank you

  • Event QtQuick App cannot play the sound on the playbook + other problems

    Hello

    I wore a qtquick running on BB10-based application successfully. My long-term problem, it's that my applications cannot play the .wav sounds. He used the QtMobility on symbian. I am looking for a replacement and trying to adapt with open AL example in BlackBerry Github, but hopeless.

    Here is the source code: https://gist.github.com/fe1fcbbb6753bb7ff06b

    I'm lie the audio to the qtquick with the setcontextproperty method qml file. I checked with console.log () it is called.

    I wonder that the problem between the location of the file or the method is not called.

    my sounds is located under directory

    QML/stem/sounds/from the root.

    I also find that I don't see no output from qDebug.

    I use the Qt Creator for PlayBook. I wonder if I can use the momentics?

    Thanks for help. I expect to release my app before the release of BB10

    I have my solution for this problem. I opened my .pro via momentics IDE. I clicked the right mouse in the project > set up > add libraries > check list all libs > then follow the cheats provided to change the .pro files. Simple and it works.

  • [Playbook Simulator] Doesn´t work :(onclick event (apiDemo.zip for example).

    Hello everyone.

    I downloaded the example webwork "apiDemo.zip."  I have compiled and deployed correctly, but when I run the work of doesn´t webwork.

    The webwork is very simple, just a single button and when the button is pressed, it shows and alert message.

    Someone has a problem?  How to fix?

    Thank you, best regards.

    I Don t know how, but now the code works properly.

    (Maybe a javascript error).

    Thank you.

  • Is it possible to listen to the exit app event in webworks?

    Dear all,

    Is it possible to listen to the exit app event in webworks?

    What I would do is:

    Displays a warning message (told that notification feature will be disabled) to the user when they attempt to close the application.

    I saw resume, pause events in the document here: https://developer.blackberry.com/html5/apis/v2_0/blackberry.app.html

    And look for exit the event on playbook, bbos: blackberry. app.event. onExit )

    But found no output Earphone for BB10.

    Could you please provide any valuable resource or information about it?

    Thanks for the help.

    Unfortunately the platform as a whole does not have to "suspend" the process of application endpoints. Even if we hung out at the event, the web runtime is being demolished before that you could do something meaningful.

    Sorry I don't have better news.

Maybe you are looking for

  • Too many attempts of incorrect verification

    I answered the wrong questions in two attempts. Later / again changed the questions and answers. To emergency email. But whenever I try to enter new responses, this message appears... Too many attempts of incorrect verification You made too many atte

  • Portege R830: changing wallpaper

    I want to have a background screen or different wallpaper of the Toshiba one.I cannot put through windows. I use a Portege R830 and Windows 7. MIA.

  • How to use the evaluation version of UFT 12.02

  • M176n: No printer function doesn't work on Ubuntu 15.04

    I bought the Color LaserJet Pro MPF M176n. It worked fine in Ubuntu 14.10, but when I upgraded to Ubuntu 15.04 it has stopped working. None of its functions (print, scan to computer) work. (Copy still works because it has nothing to do with the compu

  • Advice on current carrier online please!

    Hi all Please forgive a newbie question. I have a PC in my home office ethernet cable is connected to a Cisco EPC3925 wireless router. Son and daughter have a PC in their room upstairs, with a very poor wireless service. (1) is the kit PLSK my best s