How I detect mouse wheel movement?

I never use this for now, and I want to intercept mouse wheel movement (up or down) for to change animation panels (divs) or to make another actions.
Is not for a scroll of a large stage or div, it's only for to know when the user use the mouse wheel.
Example: http://www.protest.eu/nl/dames/
Thank you.

Are you looking for this ? it may be done easily with Edge Commons
http://www.edgedocks.com/content/2013/12/using-parallax-scrolling-animate-single-line-code

Similar Messages

  • How to get mouse wheel action in my swing application?

    Hi
    In my mouse, i am having mousewheel to support scrolling.With the help of the wheel, i can scroll the pages in IE browser or any other appliction.
    In swing application ,i have scroll bar inside a JFrame.I want to have mousewheel action in my swing application to support scrolling.
    any idea ???
    Thanks

    As far as I know,there is no facility for detecting mouse scrolling wheel in JDK 1.3.
    Check it in the later releases of JDK.

  • Automator - How do I: Mouse Click, Move Windows, and more

    Hello,
    I am attempting to create my own Automator programs and for a while I had some that worked nicely. I have recently been tweaking my iMac so that it can "think" on its own (by automator of course) and do things for me. However, I've run across a block with Mavericks (I believe it's due to Mavericks).
    1. How can I get Automator to register a mouse click? "Watch me do" does not seem to want to work for me at all. I also would prefer if it would just be a registered mouse click, but not actually use the mouse (I know this is possible) so that if I'm doing something and it runs, it won't disturb my mouse and I can keep working.
    2. How can I register a keyboard stroke? Same as above
    3. How can I have automator move windows? I have two monitors and there are times when I may want it to move a window from one mintor to another
    The following is a list of all the things I'm attempting to accomplish at the moment (with other things when I think of them) with automator (either through applications, folder actions, or ical actions):
    1. Register a mouse click at a given area or on a given element in a safari page
    2. Register a keyboard stroke in a given program (be able to focus on a program and then do the keystroke)
    3. Move windows from one location to another
    4. Full-screen and Un-full-screen iTunes at certain times of day
    5. Download all purchased items on iTunes that aren't on the computer (sometimes iTunes doesn't download stuff if it was downloaded on my MacBook Pro first)
    6. Automatically voice read reminders (that I've set in Reminders) each day at a given time (I can use loop to repeat it to make sure I hear it all)
    I'll think of more of course, but the mouse click, keyboard stroke, and moving windows is the big thing I'm trying to figure out how to do. Can anyone help?
    Also, I am not a computer tech. I am tinkering with this because it's fun and helpful, but an answer of "just use applescript" or "just use java" will likely just give me a headache. I know that it's going to be one of those codes, but I'm hoping someone has a "base" code that can be copied and pasted that's just a standard click that I can adjust for where I need to click and what process I need to click on.
    If there is an Action Pack that includes a "Register Mouse Click" and/or "Register Keyboard Stroke", then that would work great, but the only action packs for automator I've seen that work with Mavericks is for photoshop.

    You're asking for a lot in one post.  It would be better to break your requests down a bit. 
    For example, to deal with mouse clicks, you can use the Automator Action Run Shell Script with this python script:
    import sys
    import time
    from Quartz.CoreGraphics import *
    def mouseEvent(type, posx, posy):
            theEvent = CGEventCreateMouseEvent(None, type, (posx,posy), kCGMouseButtonLeft)
            CGEventPost(kCGHIDEventTap, theEvent)
    def mousemove(posx,posy):
            mouseEvent(kCGEventMouseMoved, posx,posy);
    def mouseclick(posx,posy):
            mouseEvent(kCGEventLeftMouseDown, posx,posy);
            mouseEvent(kCGEventLeftMouseUp, posx,posy);
    ourEvent = CGEventCreate(None);
    # Save current mouse position
    currentpos=CGEventGetLocation(ourEvent);
    # Click the "Apple"
    mouseclick(25, 5);  
    # 1 second delay       
    time.sleep(1);        
    # Restore mouse position
    mousemove(int(currentpos.x),int(currentpos.y))
    It will look like this in Automator:
    To drag something (i.e. a window, a file icon) from position 40,60 to 60,300:
    import time
    from Quartz.CoreGraphics import *
    def mouseEvent(type, posx, posy):
               theEvent = CGEventCreateMouseEvent(None, type, (posx,posy), kCGMouseButtonLeft)
               CGEventPost(kCGHIDEventTap, theEvent)
    def mousemove(posx,posy):
               mouseEvent(kCGEventMouseMoved, posx,posy);
    def mouseclickdn(posx,posy):
               mouseEvent(kCGEventLeftMouseDown, posx,posy);
    def mouseclickup(posx,posy):
               mouseEvent(kCGEventLeftMouseUp, posx,posy);
    def mousedrag(posx,posy):
               mouseEvent(kCGEventLeftMouseDragged, posx,posy);
    ourEvent = CGEventCreate(None);
    # Save current mouse position
    currentpos=CGEventGetLocation(ourEvent);
    # move mouse to upper left of screen
    mouseclickdn(40, 60);
    # drag icon to new location
    mousedrag(60, 300);
    # release mouse
    mouseclickup(60, 300);
    # necessary delay
    time.sleep(1);
    # return mouse to start positon
    mouseclickdn(int(currentpos.x),int(currentpos.y));
    For keystokes in AppleScript (which can be added to Automator with the Run Applescript Action) see: http://dougscripts.com/itunes/itinfo/keycodes.php

  • How to fire mouse wheel events to parent container?

    Hi,
    When I create a JPanel (let's say jParent) inside a JScrollPane and this JPanel is larger than the current viewport I can use my mouse wheel to scroll the JPanel's containt without coding anything about that.
    But if I add another JPanel-derived component (let's say jChild) to the first JPanel, mouse wheel events are not received by the first JPanel when the mouse is over the new added child JPanel.
    How can I forward child's mouse wheel events to the first JPanel?
    If I use:
    jChild.addMouseWheelListener(jParent)I must implement a mouseWheelMoved() method in jParent that requires some code to work while it was doing it byitself before...
    Thanks in advance for any help :-)
    Regards,
    Lara.

    you have a mouseWheelListener added to jChild?
    if so, in the mouseWheelMoved code include this line
    jParent.dispatchEvent(mouseWheelEvent);//or to the scrollpane

  • How to use Mouse Wheel Events

    Hello Everyone
    I am using Datagrid in my Canvas.
    I use mouse wheel to scroll the datagrid. But in one scroll
    through that wheel make the more than 4 rows to be scroll.
    So Now my requirement is to control the delta value of mouse
    wheel event and how to use that with my datagrid so that i will
    able to scroll one row through mouse wheel scroller.
    Thanks

    please give me some suggestion around it.
    I want to scroll one row of datagrid with per mousewheel
    scroll. I am not getting how to use the scrollMouseWheelMultiplier
    property of the IConfiguration class because i am not able to
    create the object of this class.
    I am using the Flex 3.0 and flash 9 version.
    please help me out around this.

  • How to remap mouse wheel in single application?

    Hello,
    I want to achieve simple thing - control audio in Smplayer using mouse wheel. The tricky part is that I need to control the master volume on my AV receiver because the audio in videos is played as bitstream (DTS/AC3 over SPDIF). I'm able to modify the mouse wheel actions in mplayer but unfortunatelly Smplayer doesn't allow such remapping: http://smplayer.sourceforge.net/forum/v … f=2&t=6077
    I already use xbindkeys with xvkbd for application specific remapping of both keyboard and mouse. I can remap the wheel for Smplayer window but I'm unable to figure out how to make sure the wheel will work for other applications as well - I'm just unable to simulate mouse wheel action for applications other than Smplayer. (Or is there any other way how to not modify the button for other applications?)
    If I try only simulating the wheel, it doesn't work...
    # .xbindkeysrc
    "xdotool click 4"
    m:0x0 + b:4
    # or
    "xvkbd -text "\m4""
    m:0x0 + b:4
    However if I add "sleep 0.2" before xvkbd or xdotool, it works (but this is unacceptable delay for me). Also if I try to simulate wheel on keyboard press, it works even without the sleep.
    Any help or suggestion?

    not really.. sorry
    Kunal Mittal

  • SWF in iFrame - How to get mouse wheel to work

    I have been searching for a solution to this for a few days
    without any luck. I was hoping someone here may have come across
    this problem and know of a solution, or know if it just is not
    possible.
    I have a static page which consists of an iframe, picture and
    a div with some links. The image is an image map and set to load
    all links within the iframe. The flash itself is a 360 degree
    panoramic view with hotspots (links) within the file that also
    point to other pages. My issue is that the mouse wheel scroll is
    supposed to be a zoom in/out feature, which work with the flash
    file and full screen view. However, when the file is loaded within
    the iframe, the scroll wheel on the mouse will only scroll the page
    and will not interact with the flash file at all.
    The problem seems to be with the following browsers (PC):
    Chrome 0.4
    Opera 9.5
    Firefox 3.0
    The zoom works in IE6, although the page does scroll with it.
    When I disabled the page from scrolling (see index2.html) the zoom
    stops working. This is probably due to the code used to disable the
    mouse. I really need to try to get the mouse wheel to zoom in
    FireFox 3 though. The large majority of our visitors are PC users
    with FireFox 3 or IE 7, so these are the two most important
    browsers to have working.
    The pages are still currently under development but examples
    are online here:
    http://www.utoledo.edu/campus/virtualtour/maincampus/index.html
    -Normal page
    http://www.utoledo.edu/campus/virtualtour/maincampus/index2.html
    -Page with scrolling disabled
    Does anyone have any ideas for a possible solution? Thanks
    for taking the time to help.

    As far as I know,there is no facility for detecting mouse scrolling wheel in JDK 1.3.
    Check it in the later releases of JDK.

  • How to detect when 2 movie clips have been clicked?

    Hello:
    I'd like to know how can I detect when 2 movie clips have been clicked (irregardles of the order).
    What I have is this:
    In my main timeline I have 2 independent movie clips (mc_him and mc_her) each in it's own layer that, when clicked, play an internal animation without moving my main playhead anywhere. What I need to do is, once they are both clicked (as I said, it doesen't matter in what order), a button that sends me to another section of my movie has to appear. It really doesen't matter if the button shows by enabling it with alpha or by sending me to a specific frame where my button lies. What I need to detect is both clicks so that the button shows up.
    How can I achieve this?
    Thank you very much.

    btn1.onRelease=function(){
    // do whatever
    this.clicked = true;
    checkBothClickedF();
    btn2.onRelease=function(){
    // do whatever
    this.clicked = true;
    checkBothClickedF();
    function checkBothClickedF():Void{
    if(btn1.clicked&&btn2.clicked){
    // do something. both clicked
    // reset both clicked properties?

  • How to detect mouse clicks on desktop?

    Hi All,
    I need to detect mouse clicks on the desktop and find out mouse position on the screen. How to listen to mouse events if I don't have any swing components like containers, panels, windows, etc? All things like "addMouseListener" are supposed to be with such components. But my program is running in the background and it doesn't have any graphical interfaces. So, I need to detect if a mouse button is pressed at any position on the screen.
    Thanks for any help!

    Why? What program feature do you intend to offer, by knowing what a user clicks on (besides the application itself).Hi, well what I have to do is to start the application minimized in the system tray. Then the application must be listening for crtl+shift+left click in any part of the desktop or an opened application, when that happens, I have to show a window asking if the user want to take a screenshot starting in the x,y point he clicked, once done, I have to take an screenshot...so on.
    How can I do that? Can anybody give me a hint? Thanks in advance.

  • How to detect browser window move?

    Hi,
    I want to know if there is certain event defined in Java to detect browser window move. Like in JavaScript, there is an event handler "onMove".
    Thanks.

    No, I think you can have "onMove" call a java function.

  • How to detect mouse movement/key press on Mac?

    Need to write a VI that will detect/report mouse movement (ie. returns it's location) and any key (or key combinations) pressed. And, to send the mouse pointer to any location on screen. Using Labview 6i on Mac.

    The event structure is new to LabVIEW 6.1. I could post 6.1 code but I cannot save the structure for previous and LabVIEW will not open a VI from a newer version. The best place to learn about the event structure is on the What's new in LabVIEW 6.1 page.
    http://amp.ni.com/niwc/labview/lv.jsp?node=1381

  • How to detect mouse move

    Hi Guys and Gals out there,
    Actually I've problem with mouse. I think I better explain a little bit my situation down here.
    I have an Image with a few signatures, and I want user get every signature to apply on my form then I'm going to save that signature with personal data for every signature. Normally what we did is we select the signature (image) with mouse. But the problem is I don't know how... I really hope that some what who did it before could help me in this problem..... I'm sorry because I still new in Java....
    Thanks in advance,
    -Lee-

    Hi Lee
    Look at this program, it have 2 Components on the frame, lai is the 'big Image' and t2 is the Rectangle.
    The mouseListener is added to 'lai' and the location of 't2' is changed when the mouse is dragged. when the mouse is released i create a new bufferedImage and draw a piece of the 'big Image' into it.
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.text.*;
    import java.awt.event.*;
    import java.awt.image.BufferedImage;
    public class Signi extends JFrame
         Image         map;
         TheMap        lai;
         TheSq         t2;
         BufferedImage sigB;
         Graphics      sigG; 
    public Signi() 
         getContentPane().setLayout(null);
         addWindowListener(new WindowAdapter()
        {     public void windowClosing(WindowEvent ev)
              {     dispose();
                   System.exit(0);}});
         setBounds(10,10,700,530);
         t2  = new TheSq();     
         getContentPane().add(t2);
         lai = new TheMap();      
         getContentPane().add(lai);     
         lai.addMouseListener(new MouseAdapter()     
              {     public void mouseReleased(MouseEvent m)
                        sigB = new BufferedImage(t2.getWidth(),t2.getHeight(),BufferedImage.TYPE_3BYTE_BGR);
                        sigG   = sigB.createGraphics();
                       sigG.drawImage(map,0,0,t2.getWidth(),t2.getHeight(), 
                                         t2.getX(),t2.getY(),
                                             t2.getX()+t2.getWidth(),t2.getY()+t2.getHeight(),null);
         lai.addMouseMotionListener(new MouseMotionAdapter()          
              {     public void mouseDragged(MouseEvent m)
                        t2.setLocation(m.getX(),m.getY());
         setVisible(true);
    public class TheMap extends JComponent
    public TheMap()
         map = getToolkit().getImage("map1.gif");
         MediaTracker tracker = new MediaTracker(this);
         tracker.addImage(map,0);
         try   {tracker.waitForID(0);}
         catch (InterruptedException e){}
         setBounds(2,2,map.getWidth(null),map.getHeight(null));
    public void paint(Graphics g)
         g.drawImage(map,0,0,null);
    public class TheSq extends JComponent
    public TheSq()
         setBounds(1,1,120,60);
    public void paint(Graphics g)
         g.setColor(Color.red);
         g.drawRect(0,0,getWidth()-1,getHeight()-1);
    public static void main (String[] args) throws InterruptedException
         Signi fr = new Signi();
          if you like i can email the code to you.

  • How to detect mouse click event?

    Hello,
    I would like to have a vi to detect left, right and no mouse click. I mean that in the vi attached, Button2 should be 0 (no click), 1 (left c.) or 2 (right c.) depending on the event occured in i-1. cycle. My vi is the modyfied version of the one found here:
    http://www.ni.com/example/27663/en/
    Sometimes it works fine, but another time nothing happens when I click.
    I think the main problem is with the execution times at the for loop and event structure.
    Could you help me how to deal with the problem?
    Thanks you!
    Attachments:
    mouse1.vi ‏12 KB

    Hi VampireEmpire,
    Your For loop iterates twice. If an event occures during first iteration everything is fine - Button 2 refreshes during second iteration. But what happens when an event occures during second iteration? Does Button 2 have a possibility to refresh? 
    1. Do you see the problem now?
    2. And if you do - do you really need For loop? I would suggest you trying removing it and connecting shift register to the while loop.
    Bluesheep

  • How to smooth scroll a Spark List using the mouse wheel

    I've got my Spark List smooth scrolling nicely if I grab the scrollbar thumb and drag it. But when using the mouse wheel, it's jumping itemrenderer by itemrenderer.
    Is there any way to get this to smooth scroll?  I'm using a List with variableRowHeight = true.
    Thanks.

    This thread demonstrates how to customize mouse wheel scrolling:
    http://forums.adobe.com/message/2783736
    An enhancement was recently added that will allow for customizing the behavior without needing to subclass.  See this bug for the details:
    http://bugs.adobe.com/jira/browse/SDK-26432

  • Finer control with mouse wheel (Windows)

    Lightroom is so much about speed of execution, and I would be even faster if it allowed me to use the mouse wheel to move sliders in the Development module effectively. Right now the mouse wheel moves the sliders in increments/decrements that are too large. E.g. slides for Recovery, Black and Fill Light go in steps of 3, the Brightness sometimes in steps of 9 sometimes of 10, depending on its current value, contrast in steps of 5. It is too coarse. All those slides should go 1 by 1, for fine tuning; color temperature should go, say, 100 by 100. For brisk adjustments I can already drag the slider or input a value.

    Did you check the settings in the mouse driver software in case something has changed?
    Boot the computer in Windows Safe Mode with network support (press F8 on the boot screen) as a test.
    *http://www.bleepingcomputer.com/tutorials/how-to-start-windows-in-safe-mode/

Maybe you are looking for

  • MyStart-by Incredibar - How do I get rid of it. I have tried resetting Firefox in all ways ad infinitum, and all the other suggestions I can find. I

    For the past few months I have been trying to get rid of MyStart by Incredibar. I have reset my computer to Firefox default, I have restarted Firefox with and without addons, I have searched with windows explorer and found and removed anything with i

  • Content server   404 auth error

    hopefully this is where this should be posted. we have a pc-ui application that needs to retrieve a signature that was captured via crm mobile sales and sychcronized to crm online.  currently we can not get the signature to synchronize. we are trying

  • Oracle Apps Clone Forms Error FRM-92050

    Cloned our Advanced Supply Chain Planning EBS Test environment in order to create our production ASCP EBS environment. Was able to clone and configure new production environment with no errors but when I log into the new environment when I click on a

  • Dataware house question

    Hello Everyone, In dataware housing what needs to be higher the SGA or PGA? I have read it that it was suppose to be PGA? Can any1 clearify this for me. Thanks in advance

  • I can't get Final Cut back on my Macbook Pro

    When I first installed Final Cut Studio on my Macbook Pro back in 2007, I manually removed the apps I didn't use that often to save space b/c my hard drive was almost full. I eventually removed all the apps from Studio, dragging them all to the trash