movable control problems and onTouch event

Hi guys

In my last question, I posted about how can I make a movable control and it works fine, but now I have another question, when I drag a control and put on another control, which moves another control I guess that the elements are mixed with the OnTouch event.

Here's an example I want to:

But instead, the control move another decline of the level controls (when I drag control too close to a third party):

I don't know how I can fix, I use a DockLayout, so that shouldn't happen.

I use the following code on my movable controls:

ImageView {
         id: watermark1
         imageSource: watermark.imageSource
         opacity: watermark.opacity
         translationX: 0
         translationY: 100
         attachedObjects: [
             ImplicitAnimationController {
                 id: translationControllerY
                 propertyName: "translationY"
             },
             ImplicitAnimationController {
                                     id: translationControllerX
                                     propertyName: "translationX"
             }
         ]
         property real iniX : 0;
         property real iniY : 0;
         property real posicionY: 100;
         property real posicionX: 0;
         onTouch: {
             translationControllerY.enabled = false;
             translationControllerX.enabled = false;

             if (event.isDown()) {
                 iniX = event.windowX;
                 iniY = event.windowY;  

             }
             if (event.isMove()) {
                guide.opacity = 0.6
                guide1.opacity = 1.0
                watermark1.translationX = posicionX + event.windowX - iniX;
                watermark1.translationY = posicionY + event.windowY - iniY;
                console.debug(iniX, iniY)
                console.debug(watermark1.translationX + " and " + watermark1.translationY)

             }
             if (event.isUp()){
                 guide.opacity = 0
                 guide1.opacity = 0
                 posicionX = watermark1.translationX
                 posicionY = watermark1.translationY
                 console.debug("item left")
             }
             if (event.isCancel()){
                 guide.opacity = 0
                 guide1.opacity = 0
                 posicionX = watermark1.translationX
                 posicionY = watermark1.translationY
                 console.debug("Cancel)
             }
           }
         }

Hope you can help me

Bravo and thank you!

If you have this movement attached to each 'widget' code, then you will need to cover the event notecard for each other widget outside that you drag.

The simplest but not the most elegant way is to set a global variable because everyone can see who puts a simple if statement around the code onTouch.

Tags: BlackBerry Developers

Similar Questions

  • Problem with the event and the case of Structure

    Hi all,

    I get the problem in my program, I'm using the two structure one is the same and other structure box.

    In the structure of the case, I had the button as an entry to the SPL and the case structure as the output of the structure of the case.

    And in the same, then I had the two text box (num control A and B) in that I had put the event changes its value. Then, even I put the value has

    num or num B control control control this corrosponding num value will save seeing num C. Now the problem is when I click on

    the theLEB button does not blink until or if you don't put the value of one of the corrosponding num control.i didn't post my file in version 8.5 and 8.6 Please find tha.

    Hello

    It should work like that or I misunderstood what you want to do.

    If Boolean is true, boolean 2 is true, at the same time, you can change the value of A so C or B then C.

    See attachment

  • ATI external Module Event Utility EXE has encountered a problem and had to close

    ATI external Module Event Utility EXE has encountered a problem and had to close

    Error signature
    szAppName: ati2evxx.exe szAppVer: 6.14.10.4138
    szModName: szModVer ati2evxx.exe: 6.14.10.4138 offset: 0002dcb0

    The following files will be included in this error report:
    Temp\WERbc26.dir00\ati2evxx.exe.mdmp
    Temp\WERbc26.dir00\appcompat.txt

    I get this error several times after a reboot when you first login.  To eliminate this any help would be greatly appreciated!

    I solved this problem myself.  I went to the website of AMD and downloaded the latest version of the software (Catalyst Control Center) and pilots, and that seems to have solved my problem.

  • Repair Windows scam - cannot control panel access control or workstation "Windows Explorer has encountered a problem and needs to close."

    Original title: repair Windows scam - Can can't Access Control Panel or workstation

    My system has been recently infected with "Windows" repair"virus. I managed to delete using Super Anti-Spyware, but all my desktop shortcuts are gone (hidden) so I downloaded "Unhide.exe" and get all my shortcuts. Most of them seems to be working as before, but there are a few, such as 'My Computer', ' Panel, "My Documents", or even "Windows Explorer", which I can't access.» When I try to open them, I get this popup box saying "Windows Explorer has encountered a problem and needs to close" how much he out me of my office of kicks.

    Any suggestions?

    Thank you!

    Brian

    The best way to solve this maybe just create a new user account, transfer your personal data to this account, and then delete the old account. Make sure that you perform the system restore after you did the new account and everything works fine. To purge the system restore, simply disable it then again. Be aware that the creation of a new user account is not the means to get rid of malware. But it is perhaps the best way to get rid of some of the after effects. However, I recommend you scan with Malwarebytes before running these instructions. After scanning you may not create the new account.

    In addition, Jose is correct. Good number of new forms of malware prevent the start in safe mode. Trying to force booting in SafeMode with msconfig, you end up with a boot loop.

  • Problem with the events and Movieclips

    Hi all.

    I got myself in a situation where everything was perfect with zoom events, keyboard events and drag-, click of the mouse.

    The project is:

    A movieclip with image sequence: original background.

    And other clips: also images sequence (png)

    They were all separate specific mouse events and all the zoom and key events.

    Now wen I click on the button with the movieclip to function, only the png image sequence is turning and the main mc is not.

    What should I do to rotate active both regardless of the mcs and main mc also png with these.

    Help, please.

    Thank you in advance.

    use:

    var mcA:Array = [garage_horizon_mc, garage_moss_mc, garage_ocean_mc, gutter_ocean_mc, gutter_horizon_mc, Audrey r_moss_mc, main_mc];

    for (var i: int = 0; i<>

    mcA [i] .addEventListener (MouseEvent.CLICK, garageF);

    }

    function garageF(e:MouseEvent):void {}

    for (var i: int = 0; i<>

    mcA [i] .visible = false;

    }

    var mc:MovieClip = MovieClip (e.currentTarget);

    mc.gotoAndStop (rotationframe);

    MC. Visible = true;

    whateverF (mc);

    }

    function whateverF(rotater_gah:MovieClip):void {}

    rotater_gah.offsetFrame_gah = rotater_gah.currentFrame;

    rotater_gah.offsetX_gah = 0;

    rotater_gah.percent_gah = 0;

    rotater_gah.addEventListener (MouseEvent.MOUSE_DOWN, startDragging_gah);

    rotater_gah.addEventListener (MouseEvent.MOUSE_UP, stopDragging_gah);

    }

    function startDragging_gah(e:MouseEvent):void {}

    e.currentTarget.addEventListener (MouseEvent.MOUSE_MOVE, drag_gah);

    e.currentTarget.offsetX_gah = e.target.mouseX;

    }

    function stopDragging_gah(e:MouseEvent):void {}

    e.currentTarget.removeEventListener (MouseEvent.MOUSE_MOVE, drag_gah);

    e.currentTarget.offsetFrame_gah = rotater_gah.currentFrame;

    }

    function drag_gah(e:MouseEvent):void {}

    e.currentTarget.percent_gah = (e.target.mouseX - e.currentTarget.offsetX_gah)/e.currentTarget.width;)

    var frame_gah:int = Math.round(e.currentTarget.percent_gah*e.currentTarget.totalFrames) + e.currentTarget.offsetFrame_gah + 1;

    While {(frame_gah>e.currentTarget.totalFrames)}

    frame_gah = e.currentTarget.totalFrames;

    }

    While (frame_gah<=0)>

    frame_gah += e.currentTarget.totalFrames;

    }

    e.currentTarget.gotoAndStop (frame_gah);

    }

  • Problem of double event?

    Hello

    I need someone to help to understand and help solve this problem.

    I received a tree on the main panel of top-level, the tree and the Committee have a right-click event.

    The event, then run a menupopup and two menus are loaded on the main table.

    The problem is when I right click on the tree it works the menupopup but the right-click event was sent to the Panel so that then runs the other menupopup.

    Can you explain to me why what is happening and if there is a way of swallowing the event went to the Panel?

    It is expected all behavior in response to reminders. As seen in the online help,

    When users click with the right button of the mouse anywhere or a Panel, an EVENT_RIGHT_CLICK event occurs and is sent to the callback function associated with the Group of experts, as well as for the associated callback function to the control that the mouse click occurred.

    The order in which events are received by different objects in the user interface is (online help, "Priority of the callback functions" section):

    • For the events of operation control:
      1. Recall command
      2. Main recall
      3. Reminder of Group (keypress and mouse events only)
      4. Main recall

    To swallow an event interface user simply return a value non-zero the reminder (in your case the reminder of control so that the event is not passed to the callback Panel).

  • Generic host process for win32 services has encountered a problem and cannot update windows

    Whenever I start my computer, I get this error message "generic host process for win32 services has encountered a problem and needs to close." The details of this problem are:

    (szappname:svchost.exe), (szappver:5.1.2600.5512), (szmodver: 0.0.0.0), (offset: 001 has 6240), (szmodname: unknown)

    c:/DOCUME~1/owner/locals~1/temp/wer94ea.dir00/Svchost.exe.mdmp

    c:/DOCUME~1/owner/locals~1/temp/wer94ea.dir00/appcombat.txt

    I also send an error report whenever this happens.

    The computer is running XP, but lately some settings have been changed such that the display is windows classic instead of XP.

    In addition, I can't run Windows Update completely. It freezes / hangs up in the middle of the update. I have also no audio.

    Please help, I ran SuperAntispyware, Spybot, and Avira. I'm lost!

    Reinstalling the operating system is unable to solve your problem. There is no need to do this if the problem is not related to the operating system and you find that you are back where you started.

    You gave us a general indication of the nature of the problem but the specific error reports are a much easier solution.

    When a BSOD (Blue Screen of Death) the system failure occurs, for most users, there not enough time to fully record what he says. the exact text is important for anyone trying to diagnose what is wrong. You can save time when the error occurs then by following the procedure described below.

    If you already did it disable the auto reboot system error. This should help by allowing the time to write the code to Stop error and related information correctly. Do right click on the icon my computer on the desktop and select Properties, advanced, startup and recovery, system failure and uncheck the box before automatically restarting. Re-do not enable automatic restart in the event of system failure after obtaining this information, this setting is the best left to not allow an automatic restart.

    If the failure occurs during the initialization of the computer, you need to try a different approach. You can access the Advanced Options Menu of Windows on multiple computers by constantly pressing the F8 (key) key when starting and selecting the option - disable automatic restart in case of system error. This method is not always easy to use because it may be difficult to press the F8 key at the right time. Try again if it doesn't work the first time. On some computers, a different key must be used.

    Take a look in the system and Application logs in the errors and warnings event viewer and post here the copies. Do not post on that more than 48 hours ago.

    You can access event viewer by selecting Start, Control Panel, administrative tools, and Event Viewer. When searching for the meaning of the error, information about the event ID, Source and Description are important.

    A tip for posting copies of error reports! Run Event Viewer and double-click the error you want to copy. You will see a button resembling two pages. Click on the button and close Event Viewer. This places a copy of the report to your Clipboard. Paste it into the body of your message. Make sure that it is the first dough right out of the event viewer.

    Hope this helps, Gerry Cornell

  • reports on the problems and solutions has stopped working message all the time

    I can't access the control panel reports of problems and solutions and constantly get one - problem reports and solutions has stopped working, message on the screen.

    How can I disable or fix this problem.

    Hi NickMeyer,

    1. have you made a recent software or hardware changes to the system?

    You can check if there is information in Event Viewer which may help us to solve the problem:

    What are the information contained in the logs of the event (Event Viewer)?

    You can also temporarily disable the security software and firewall installed on the system and check if the problem persists.

    Note: Be sure to enable the security software on the computer after checking.

    Hope this information is useful.

  • Control Panel and update of Windows fail to boot, Windows comes with Startup Repair tool regularly.

    Hello, we had problems with our computer Packard Bell for some time, but recently it has deteriorated with both the control panel and windows update is unable to start. In addition, we noticed that the Startup Repair appears fairly regularly too. We had to use Packard Bell restore a couple of times as Startup Repair did not resolve the problems. The problem with the control panel windows updated and started after the installation of updates after the last recovery of the computer. I noticed that the Panel works in safe mode, however, windows update does not work. After the course on problem reports and solutions, we noticed several mistakes "Windows update installation problem. When we clicked on a for more details, it appeared:

    A Windows Update was not installing correctly. Send the following information to Microsoft can help improve the software.

    Signature of the problem
    Problem event name: WindowsUpdateFailure
    ClientVersion: 7.4.7600.226
    Win32HResult: 80070426
    UpdateId: 00000000-0000-0000-0000-000000000000
    Scenario: Scan
    SourceId: 101
    Environment: unmanaged
    OS version: 6.0.6000.2.0.0.768.3
    Locale ID: 2057

    Additional information about the problem
    Bucket ID: 719632728

    We have analyzed viruses and found nothing. Thank you for reading the question, a solution would be much appreciated, thanks.

    Hello

    Frequently, this error code occurs when the software licensing service is stopped. Click Start, type services.msc and press . Click on continue in the UAC prompt. Scroll the list to the software licensing service and click on it. Now click on start or restart option in the left column. Close the dialog box and restart Windows Update.

    Good luck, Rick Rogers, aka "Crazy" - Microsoft MVP http://mvp.support.microsoft.com Windows help - www.rickrogers.org

  • Windows Fax and Scan/Event Viewer

    I have 2 issues that I believe are interdependent.

    I am running W7 x 64 edition family and until recently and scanning worked perfectly but suddenly stopped. Now the application does not show my internal Modem (soft) or my external Fax Modem - that are displayed in the device (with no problems) Manager. The App said No accounts set up, and when I try to accounts 'Add', nor the modem show and if I try to ' add by using a name, I just get a statement of error message "the mentioned fax server is not available"... telling me to try again later."

    When I first set up fax and scan, I just plugged my Modem Fax (new) and when I went to add accounts - the two Modems showed. I simply took the external Modem and everything worked fine - now none of the Modems are recognized.

    I tried the remedy of re-fax service under control panel of configuration/administration/services etc... is indifferent.

    I looked at a lot of positions since 2007 and this seems to be the problem well documented and a pending problem resulting from an update of Windows, but it is unclear which.

    Of all the posts I've seen, it's a well known error / well documented that has not already been corrected.

    At the same time, my event viewer does not work - when I try to open it, a message simply says "Service not available event log. Verify that the service is running.

    I try to run the service and "starts and stops"... In any case, among the thousands of posts on this topic and also I tried remedies including remove/rename the Windows/system32/LogFiles/WMi/RtBackup

    I think remember me one saying the 2 problems are interrelated. Any ideas?

    Hi Gerry,

    No, I have already gone through Device Manager and no device No. Bad shown.

    Yes, I used fax and scan before several times on my x 64 system and it worked fine until recently.

    HOWEVER, "good news".

    I found a site called http://tools.sysprogs.org/srvman/ SYS PROGS

    The site has a small standalone application called srvman that I downloaded and it allowed me to launch the event log / event viewer / Fax - which none could start the Services on the right menu by clicking on the selection and selection automatic (or manual) and then start. Each of them would start and then stop.

    In any case, they began with this app and then Windows Fax and Scan App and still no joy.

    I then went to "Turn Windows features on or off" and of selected Fax and Scan and printer Opps, then re-selected them (I had tried this method a few times before without success)...

    Restarted the computer and the events/event log viewer / fax and scan works very well... (only thing was Fax and Scan doesn't seem to see my external Fax Modem (soft) modem internal but recognized and 'Fax account' remained together upwards, so all good to go.)

    Thanks for your help... your directions encouraged me to keep plodding on this issue frustrating and eventually got somewhere - but by "Good luck" more than my own 'good management' :-)

  • Firefox has been a problem and crashed

    I had this "Firefox has a problem and crashed," started this morning. It overwrites every time when I tried to start it, even with safe mode. I tried to uninstall and reinstall Firefox. But it does not solve the problem. Here is the list of the crush reports:
    BP-24ed344a-6d03-4341-aa9d-f3c6f2140917
    BP-3c53dc49-c3d3-4222-80bf-be77d2140917
    BP-1d35cd40-C223-45E2-9395-87b7b2140917
    BP-1b0956a8-6329-4FE7-8174-3282c2140917
    BP-dc1cf498-839a-41d1-B485-cc3b82140917
    Help, please! Thank you!

    Hello, please report to us with your crash id. This seems to be quite prolific start at this time crash. other affected users have reported that it is solvable by a clean reinstall:

    1. Please try to uninstall firefox from the system control panel.
    2. then go to the firefox program folder (usually located in C:\Program Files (x 86) \Mozilla Firefox) and delete the rest of the firefox program folder everything manually
    3. later and try reinstalling the browser with a new copy of https://www.mozilla.org/firefox/all/
  • Control SMART and short CIOS not installed? New notebook

    Hello

    My parents sent me the 4440 s of HP Probook. I turned it on and it was working fine. No problem at all, but the hard drive was very small. Only 59 concerts. So, I took the hard drive from my old laptop (which still works. 300 concerts) and put it in the new laptop. When I turned it on this pop up.

    HP PC Hardware Diagnostics UEFI

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

    Version 1.6.0.0 - BIOS

    then it gives me the opportunity to perform a verification of memory, hard disk check, language and output. Memory passes test, but when I do the hard disk (quick audit and comprehensive check) check it says controls SMART and short CIOS not installed.

    When I click on leave peripheral saus to boot not found, please install system of operating on hard drive.

    Here is some of the best. I took the hard drive out and put the new hard drive and little return in the new probook, and the same message appears. I don't know why. I can't figure out what it could be. My father-in-law has a good knowledge of computers, but unfortunately, on the phone it cannot be a great help.

    Someone save my new laptop beautiful!

    The diagnostic program has done a small partition on the hard drive to it. When you have removed it, so that has UEFI. You need to reinstall as the only one available is the one stored in the BIOS.

    Here's that and your BIOS update.

    This is for Windows 8.1 as you say this is a brand new, that is my logical guess.

    http://h20565.www2.HP.com/portal/site/hpsc/template.page/public/PSI/swdDetails/?sp4ts.Oid=5269090 & spf_p.tpst = swdMain & spf_p.prp_swdMain=wsrp-navigationalState%3Didx%253D%257CswItem%253Dob_125646_1%257CswEnvOID%253D4158%257CitemLocale%253D%257CswLang%253D%257Cmode%253D%257Caction%253DdriverDocument & javax.portlet.begCacheTok = com.vignette.cachetoken & javax.portlet.endCacheTok = com.vignette.cachetoken

    UEFI: http://h20565.www2.hp.com/portal/site/hpsc/template.PAGE/public/psi/swdDetails/?sp4ts.oid=5269090 & spf_p.tpst = swdMain & spf_p.prp_swdMain=wsrp-navigationalState%3Didx%253D%257CswItem%253Dob_125304_1%257CswEnvOID%253D4158%257CitemLocale%253D%257CswLang%253D%257Cmode%253D%257Caction%253DdriverDocument & javax.portlet.begCacheTok = com.vignette.cachetoken & javax.portlet.endCacheTok = com.vignette.cachetoken

    I hope this helps. I used the basic model for it, and it should work. If you have any problems, send the product so that we can check the cross. However, there should not be a problem.

    JHS

  • Video problems and a green screen

    Hello

    I read the questions and answers on this topic, but some things work and others do not.  For example, I was able to solve one of my problems with some other fixes I found through online forums General for the 'green' screen that plays with the audio only.  It seems to work for me on you tube but not on Facebook more videos alhtough Facebook worked the first time when I rebooted.

    What I did get into my internet options and under accelerated graphics that I checked use software rendering instead of...

    and on the Security tab, I checked activate 64-bit processes in increased protected...  It Enhanced protected mode should as well then?  Should I check this option.

    I also treid to do what the responses recommended... as a right click on the video on Facebook when he plays and then I get a pop up I get the settings options or global settings and adobe flash player info... by clicking on settings gives me options but none for "screen", only for my microphone, camera and storage.  If I click on global settings, need me to flash player help.  And the last option, I get my version of Adobe info, which is version 13.00.214.  So no option to uncheck the box disable accelerated graphics cause I think I already did this in Control Panel.

    But why is working with youtube and videos from Facebook that I also tried to play videos as wmv and other video files files in my windows media player flash and then I get a screen black but still audio not play now.

    My computer is a HP Pavilion Notebook PC and it came with Windows already installed 8.1.  My graphics card is a Radeon R5 AMD graphics card.

    So what the devil now.  Should I install more recent Adode Player?  Even by unchecking the option graphis accelerated, this isn't really a solution for the deeper problem and the question, because then it slows down your graphics card?

    My computer is not even a week and I hate having to always download the patches and constant updates and spend hours searching for and trying to solve a problem that really should not appear in a first time.  Why are there so many problems with Windows?  Is this a problem with windows updates as well.  Active X controls?  Isuses of compatibility with 64-bit processes.  Can I use Firefox.  I did with my old HP, which finally launched the bucket and that's why I had to buy a new one.  I had to replace my battery before a year and my warranty battery lasted that long either and then the thing finally overheated and died.  But I had a lot of similar things happen before with the last HP laptop if it's Windows or is it HP or is it browsers, readers?

    I'm sorry if I'm unloading on you... I want too much, but it's so frustrating as a consumer of always having to go through such things.  I use my laptop to work on his own account so please help!

    Thanks for letting me vent...  I'd appreciate your help, thank you.

    A frustrated customer

    Thank you for visiting the Forums HP's Support and welcome. I'm sorry you're having problems.  I looked into your problem with video problems.

    You have uninstalled Internet Explorer?

    Have you tried Google Chrome?

    It already includes Adobe® Flash® Player built-in. Google Chrome automatically updates when new versions of Flash Player are available. Adobe are on version 15. Here'sa place to update. It has a link to Google Chrome as well.

    Here is a link to common problems of Flashplayer.

    I would try a system restore because this could undo any change that could happen with an update from Microsoft. Sometimes they have not completed or installed on the laptop.

    Hope this helps you.

    Thank you.

  • T400: Problem and FIX for UK Conexant Audio Driver for Windows Vista and XP (4.92.2.0 2009/04/23)

    Hello

    I installed the new drivers Conexant for my T400 (the driver is also for R400, R500, T400, T500, W500, W700, W700ds, X 200, X200s, X 200 Tablet, X 301) yesterday.

    This morning I had to adjust the smart-audio feature works correctly with my helmet of docking station for VoIP calls. The control panel SmartAudio applet would work well. It crashes.

    Today a .net developer and that it is a .net application I got it debugged in Visual Studio. The problem, apparently, is that the folder "C:\Program Files\CONEXANT\SAII\en-GB" does not exist on my machine. Of course, it is true. The solution is to go to "C:\Program Files\CONEXANT\SAII" and copy the contents of the "en-US" folder to a new folder "en-GB".

    Just thought I'd share this incase anyone else has problems and so Lenovo can fix if all goes well the installation. I suspect it will be wishful thinking, to provide them with real ENGLISH values for resources in en - GB instead of corrupt English which is probably in the American version resources

    Andrew

    Moderator Note: Type added to the line object for clarity.


  • HPSF.exe has encountered a problem and needs to close

    using pavilion hp Elite desktop, windows 7 Edition 150ff Home premium, receive a HPSF error message. EXE has encountered a problem and needs to close. I tried to download it again from the HP website, but I get a message saying "your system does not meet the minimum requirments for this update, update has been cancelled. (1602) my computer has a hard disk of 1 terabite with 8 GB of ram and I have very little installed above with the exception of 4 songs and microsoft office and student that I bought and Norton Internet Security.

    Someone can tell me why I get this message and how do I fix the problem, my office is wired but my printer is wireless, I have high speed internet and I have also a HP Envy 700-019 again at Christmas last year, which has a HD 2 terabite with 12 GB of ram and windows 8, desktop computers are 64-bit. Not used at the same time.

    This message means that the HP Support Assistant had a problem.

    I recommend to uninstall the application from the--> utility Control Panel programs & features and then put it back. You can use the charm of the search and the type of programs & features. Click on the above icon to call the utility.

    You can reinstall from the Recovery Manager.  Invoke the charm of the search and type in recovery and click the icon.

    Find the Recovery Manager from the list of drivers and applications and put a checkmark in the box to the left and then click install in the lower right corner.

Maybe you are looking for