Disable the mouse wheel on a scrolling text box?

I'm quite familiar with Actionscript, and this has baffled me completely. What I'm trying to do is prevent people from scrolling a TextArea with their mouse wheel, as the text box is inside a ScrollPane and now scrolling allows to scroll the other (double scroll). Initially, I tried:

tArea.textField.mouseWheelEnabled = false;

However, it did not work. After some research, I found some suggestions to replace the function childrenCreated of my class that extends the text box, ala

override protected function childrenCreated (): void {}
super.childrenCreated ();
textField.mouseWheelEnabled = false;

}

but this won't work in Actionscript 2. Finally, after some research, I found some suggestions to intercept and disable events, ala


this.addEventListener (ScrollEvent.SCROLL, this.disableScrollHandler);
textField.addEventListener (MouseEvent.MOUSE_WHEEL, disableMouseHandler, true);
verticalScrollBar.addEventListener (MouseEvent.MOUSE_WHEEL, disableMouseHandler, true);
addEventListener (MouseEvent.MOUSE_WHEEL, disableMouseHandler, true);
textField.addEventListener (MouseEvent.CLICK, disableMouseHandler, true);
verticalScrollBar.addEventListener (MouseEvent.CLICK, disableMouseHandler, true);
this.addEventListener (MouseEvent.CLICK, disableMouseHandler, true);
.
.
.
function disableMouseHandler(event:MouseEvent):void {}
trace ("disableClickHandler");
Event.preventDefault ();
event.stopPropagation ();
}
function disableScrollHandler(event:ScrollEvent):void {}
trace ("disableClickHandler");
Event.preventDefault ();
event.stopPropagation ();
}

But this has not as well. I have something wrong? Is it just not possible? What is the problem here?

Thank you
Stephen M.

Strange... in order to make it work I had to do both methods, that is to say in my TextArea subclass, I put

textField.mouseWheelEnabled = false;

and I created a listener to stop the spread of the mouse wheel event:

addEventListener (MouseEvent.MOUSE_WHEEL, disableMouseHandler, true);
...
function disableMouseHandler(event:MouseEvent):void {}
event.stopPropagation ();
}

It does not exactly what I need it to do, as it make sure the ScrollPane does not receive the scroll event either, but I can ignore it or find a workaround.

Tags: Adobe Animate

Similar Questions

  • HP TouchSmart Desktop PC 600-1120: disable the mouse wheel click

    Hello

    I have a HP TouchSmart 600-1120 Desktop PC, and I want to disable the click of the scroll of the mouse wheel, so it only scrolls up and down and is not clickable. The click is so sensitive, it's difficult to scroll without accidentally clicking the wheel.

    I can't find the right Wizard or the controls for this. Can you tell me the driver please?

    Thank you

    Here are the specifications of your desktop HP TouchSmart 600-1120 According to the specification, this model left the factory with Windows 7 64 bit installed. I have a HP 320-1120 m, which also uses Windows 7 64 bit and I have been unable to locate the mouse settings that would be necessary you to disable this feature. You can search on internet of the possible options.

    Please send Bravo

  • Disable the mouse wheel events Flex scrollbar (Flex 3)

    I am currently working on a Flex project where the main of the application can load Flash .swf files or Flex .swf files. Some of these swf files have content (text, movieclips, etc.) that scroll with the scroll bars. That's fine when the .swf file is based Flex, but when the Flash .swf is based event triggers mousewheel scroll bar of the main application and the .swf scrollbar at the same time. Is there a way to disable the event mousewheel on the scroll bar of the main application (or any Flex container)?

    Add an eventlistener with a higher priority and call stopImmediatePropagation

  • How to scroll by using the mouse wheel on a parent scroll pane

    Hi guys,.
    Imagine a table. In each cell of the table represents a component of a get. All aspects of ahmed are configured so that the scroll bar is visible only when it is necessary.
    Then, ALL cells contain scroll shutters, but only a few of them actually show a scroll bar.
    The entire table (which is very large) is also in a global scroll pane and is drop-down.

    My problem:
    I want to use the mouse wheel to scroll on the entire table. Because the table contains all its cells do scroll panes, the inner scrollpanes takes very quickly focus and global scrolling stops immediately.
    How can I force the weel mouse seize ONLY on the overall scroll pane? So basically not to transfer events to its internal components?

    I tried to disable the mouse wheel on all aspects of internal scroll:
    xxx.setWheelScrollingEnabled(false);
    ... but it doesn't.
    Any idea?

    So basically not to transfer events to its internal components?

    You must manually transfer the events to the external component to scroll.

    Using the concepts presented in [url http://tips4java.wordpress.com/2009/08/30/global-event-listeners/] Global event listeners, you can do something like:

    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    
    public class ScrollSSCCE extends JPanel
    {
         public ScrollSSCCE()
         {
              setLayout( new BorderLayout() );
    
              Box tables = Box.createVerticalBox();
              final JScrollPane scrollPane = new JScrollPane( tables );
              add( scrollPane );
    
              for (int i = 0; i < 5; i++)
              {
                   JTable table = new JTable(20, 4);
                   JScrollPane sp = new JScrollPane( table );
                   sp.setPreferredSize( new Dimension(300, 200) );
                   sp.setWheelScrollingEnabled( false );
                   tables.add( sp );
              }
    
              long eventMask = AWTEvent.MOUSE_WHEEL_EVENT_MASK;
    
              Toolkit.getDefaultToolkit().addAWTEventListener( new AWTEventListener()
              {
                  public void eventDispatched(AWTEvent e)
                  {
                       Component source = (Component)e.getSource();
    
                      if (source != scrollPane
                        &&  SwingUtilities.isDescendingFrom(source, scrollPane) )
                      {
                           MouseWheelEvent mwe = (MouseWheelEvent)e;
    
                        MouseWheelEvent event = new MouseWheelEvent(
                                  scrollPane,
                                  mwe.getID(),
                                  mwe.getWhen(),
                                  mwe.getModifiers(),
                                  mwe.getX(),
                                  mwe.getY(),
                                  mwe.getXOnScreen(),
                                  mwe.getYOnScreen(),
                                  mwe.getClickCount(),
                                  mwe.isPopupTrigger(),
                                  mwe.getScrollType(),
                                  mwe.getScrollAmount(),
                                  mwe.getWheelRotation());
    
                             scrollPane.dispatchEvent( event );
                      }
                  }
              }, eventMask);
    
         }
    
         private static void createAndShowUI()
         {
              JFrame frame = new JFrame("ScrollSSCCE");
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.add( new ScrollSSCCE() );
              frame.setSize(330, 600);
              frame.setLocationRelativeTo( null );
              frame.setVisible( true );
         }
    
         public static void main(String[] args)
         {
              EventQueue.invokeLater(new Runnable()
              {
                   public void run()
                   {
                        createAndShowUI();
                   }
              });
         }
    }
    
  • Scroll personalized Flash (working on the mouse wheel)

    I search the web for good work vertical scroll Flash and can't seem to find a good solution. I'll use it for the layout product with all the images. So I guess that means no scrolling text but a scroll of MC.

    My main design problem is I want a user to be able to scroll with the mouse whell (same way as HTML frames).

    I don't like that available to throughout the site scrolls upward, I rather refer to a section in the layout of the site where the information can be scrolled. This way the site logo and all the main navigation at the top will always be visible.

    Main problem is that I can't find a parchment that would work on scrolling the mouse wheel, a user is always having to enter the bar, or click the up/down arrows so that the roll to work.

    Is it possible to make a scrolling to work on a wheel of the mouse in flash?

    Try the ScrollPane . It's basically a MovieClip containing vertical and horizontal scroll bars attached. You can assign it by using the content source property. After manipulation of sources, you must call the update() method to update scrollbars to new content.

  • My mouse is running on Win XP and when trying to scroll by using the mouse wheel - it 'slides' return

    My mouse works on Win XP and when trying to scroll with mouse wheel - in Excel or IE8 - screen scrolls sometimes or to return to his position earlier some lines and "slips".  I tried with the evolution of the mouse, but a new one made in same way. Two mouse works perfectly on the other PC. Help, please!

    Hi Stamen.

    I understand that you can not correctly scroll with the mouse wheel.

    1. What is the brand and model of the mouse?
    2. is it a mouse wireless or wired mouse?
    3. did you of recent changes to the computer?

    I suggest to see the next procedure and check if it helps.

    Method 1:


    You can read the article and check if it helps.

    The problems with the mouse button or scroll the parameters


    http://support.Microsoft.com/kb/303091

    Method 2:


    You can also check out the article and check if that helps.

    Mouse, touchpad and keyboard with Windows problems


    http://Windows.Microsoft.com/en-in/Windows/help/Mouse-touchpad-and-keyboard-problems-in-Windows

    Hope this solves the problem. If you still experience this issue, then you can get back to us with the result and more information on this issue.

  • InDesign CS5 for windows only allow me to scroll through the functions with the mouse wheel

    Nice day

    InDesign CS5 for Windows only allow me to scroll through the functions with the mouse wheel and for example not allow me to access drop down menus, any help will be much appreciated

    https://helpx.Adobe.com/InDesign/KB/InDesign-tools-panels-Don ' t - respond.html

  • By pressing the mouse wheel Center is no longer, a link opens in a new tab.

    By pressing the mouse wheel Center is no longer, a link opens in a new tab. I tried to disable all add-ons, the problem still exists. I tried upgrading my mouse driver, it was already up to date.

    I already tried all the advice from this old question: http://support.mozilla.org/en-US/questions/783155?s=mouse+scroll+wheel+open+new+tab & r = 0 & as = s

    Firefox 14.0.1 on Windows 7. I use a Case Logic wireless mouse. There was a recent update from Windows. The opening in a new ability to tab disappeared after this updated, but not immediately after.

    Do a "Reset Firefox" seems to have solved the problem.

  • Suddenly my mouse wheel does not scroll a page as before on various web pages, but on some pages it works fine; Why?

    Yesterday, I noticed that my mouse wheel is no longer scrolls from anywhere on a web page. On some pages it works well, but not on others. It of almost as if she hits a blind spot and scrolls is no longer. If I move the pointer over the bar to scroll, or near the margin, it usually works out there. If I move to another web page, it may work differently. It seems as if the formatting of the page determines whether or not it scrolls. He wasn't like this two days ago. It's frustrating when you move the wheel and expect the page to scroll and it doesn't. If I restart FF in safe mode, the mouse wheel scrolls correctly.

    If it works in Mode safe mode and normal mode with all extensions (Tools > Modules > Extensions) off and then try to find which extension is the cause by allowing an extension at a time until the problem reappears.

    Close and restart Firefox after each change via "Firefox > Exit ' (Windows: Firefox/file > quit;) Mac: Firefox > quit Firefox. Linux: Firefox/file > exit)

    See also:

  • Installed Firefox 3.6.10 now my mouse wheel does not scroll

    I just installed FF 3.6.10 update, and now my mouse wheel does not scroll. I checked my settings of the mouse, and everything is OK. Mouse wheel scrolls in applications non-Firefox, including offline and IE records online. The mouse wheel has worked well with the latest version of FF. Also tried to plug in a different mouse, (mechanical an old man to whom), same problem. If this cannot be corrected, how to uninstall the last update and revert to the previous version?

    Please read this article to see if it helps:

    https://support.Mozilla.com/en-us/KB/cannot+scroll+with+mouse+wheel+or+touchpad?s=cannot+scroll+with+mouse+wheel+or+touchpad+ & As = s

  • How can I disable the little hand that pulls (scrolls) pages?

    How can I disable the little hand that pulls (scrolls) pages?

    Hello

    Check the mouse applet in the control panel. Usually, cela lie on the device settings tab select device, click settings.

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

  • trying to turn the mouse wheel effects by clicking on

    Anyone know how to disable the effect by clicking the mouse wheel?

    Some mice may have a button just behind the two main buttons that switches click or not to click. It's a hardware thing inside the nouse. Look at the manual of the mouse or the reviews on the mouse for more info...

  • Animate CC - HTML 5 Canvas - on the mouse wheel event necessary Javascript code

    Hi all

    I'm from AS3 transition to JavaScript and it is harder than I thought.

    Can anyone suggest code JS code on the mouse wheel event timeline will play?

    Or even better on scroll down it moves forward and upward timeline scrolling back?

    Very appreciated

    Simon

    document.getElementById('canvas').addEventListener ('mousewheel', f.bind (this));

    document.getElementById('canvas').addEventListener ('DOMMouseScroll', f.bind (this));

    {function equation

    e.Detail

    }

    [left ActionScript 1 and 2 for Adobe host CC - general]

  • Zoom using the mouse wheel?

    I just upgraded from PSE 5 to 9.  One of the very practical functions in PSE 5 was the use of the mouse wheel to zoom in or on a photo that you work in the editing workspace.  Now it seems I have to use brackets or the clumsy zoom tool.


    Is there a way I can activate/change something so I can zoom with the mouse wheel?  Thank you.

    In addition, the type on drop-down menus is harder to read than in PSE 5 because the type is small and he is revered in black.  I'll explore the PSE 8 workspace.  Maybe I upgraded from too far.

    Open a photo in "Full Photo editing" mode.

    Select Edition > Preferenes > General.  Check the box that says 'Zoom with scroll wheel. "

    Bob

  • How smooth through a spark list using the mouse wheel

    I have my list Spark smooth scrolling kindly if I take the thumb of the scroll bar and drag it. But when you use the mouse wheel, the itemrenderer in itemrenderer jump.

    Is it possible to get this smooth scrolling?  I use a list with variableRowHeight = true.

    Thank you.

    This thread shows how to customize the mouse scroll wheel:

    http://forums.Adobe.com/message/2783736

    An improvement has recently been added which will allow to customize the behavior without the need to subclass.  See this bug for details:

    http://bugs.Adobe.com/jira/browse/SDK-26432

Maybe you are looking for

  • Dual boot between the preinstalled Vista and Linux

    I think installing dual-boot between Linux systems, for this I need to repartition the hard drive and reinstall vista and vista pre-installed that I na? t have the disc so that I only have recovery. Assuming that the operating system is on the machin

  • Why is windows defender stopped every time I turn on my compurtrer

    Defend Windows is turned off when I start my compurter and sometimes even if I'm on it, I'm so constqntly again. WHY?

  • Capture the active user profile

    We are doing a forensic work and I need to find a way to capture the profile of an active user on a Win7 machine. Is this possible using native tools in Windows?

  • WIN8: CBS.log over 270 GB... _.

    Hello My CBS.log newspaper is now 237 GB and I got another 100 (total Correction of all newspapers is GB 407) of various newspapers CbsPersist_ (date). I asked my brother who is a computer technician and he said try to remove them. What happened is i

  • Get 6 Lightroom on my mac pro - please help

    I brought a physical copy of Adobe Photoshop Lightroom 6 but my macbook pro 13-inch is not a disk drive, so I can't run it. Do you know how I can get it on my mac? I have the serial number and the pin code, but when I try to find a way to download th