1 Reply Latest reply on Oct 6, 2011 5:43 PM by Shongrunden

    How to Capture the Mouse wheel Press Event

    REVUSREE

      Hi Friends,,

       

      Today I encounterd some strange problem with  captureing the mouse wheel press Event .When user press on mouse wheel on a button .

       

      i am faceing problem with this please let me know.Any help is greatly appreciated!

       

      Thanks

      SREE

        • 1. Re: How to Capture the Mouse wheel Press Event
          Shongrunden Adobe Employee

          Are you looking for MouseEvent.MIDDLE_MOUSE_DOWN?

           

          <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"

                         xmlns:s="library://ns.adobe.com/flex/spark"

                         initialize="btn.addEventListener(MouseEvent.MIDDLE_MOUSE_DOWN, handle)">

              <fx:Script>

                  <![CDATA[

                      public function handle(e:Event):void {

                          trace(e.type);

                      }

                  ]]>

              </fx:Script>

             

              <s:Button label="test" id="btn" />

             

          </s:Application>