3 Replies Latest reply on Jun 1, 2009 9:46 AM by kglad

    scroll question

    wision

      Hi!

       

      How can I make to possible scrolling with the mouse wheel the embedded flash site? If the mouse is over the flash the mouse wheel doesn't work, but on the sides where flash isn't, the scroll is working. Or is there a command, which control the mouse wheel? For example: if I scroll the wheel on my mouse, a variable change his value. How can I do it? ActionScript2

       

      Thank you for the answers,

       

      WISION

        • 1. Re: scroll question
          kglad Adobe Community Professional & MVP

          the mouse class has an onMouseWheel event:

           

          Mouse.onMouseWheel=function(delta){

          // do whatever- use delta

          }

          • 2. Re: scroll question
            wision Level 1

            Thank you! The actionscript is working, but only if I click with my mouse into de flash window. How can I solve the mouse scroll without clicking into the falsh?

             

            var mouseListener:Object = new Object();

            mouseListener.onMouseWheel = function(mousescroll) {   
                trace(mousescroll);
            }
            Mouse.addListener(mouseListener);

             

             

            Thank you for your answer,

             

            WISION

            • 3. Re: scroll question
              kglad Adobe Community Professional & MVP

              in as2, i don't think you can force focus.

               

              you can try:

               

              Selection.setFocus(this);

               

              attached to your main timeline and test (NOT in the test environment).  if that doesn't work, i don't believe anything will (in as2).