1 Reply Latest reply on Feb 6, 2007 1:58 PM by abeall

    Im scrolling a div with a flash scrollbar and it works, almost

    jmschmidt
      I have successfully created a flash scrollbar that controls a div on my page as opposed to using the standard scrollbar or coloring the standard scrollbar which only works in IE. All I am doing is calling "getURL("javascript:jumptoPercent(percent);")
      from my flash movie and it scrolls beautifully using that function I made. I even put in mousewheel support. But there a few shortcoming so far, and I was hoping someone would have a pointer or two.

      1. The mousewheel doesn't work in firefox, only in IE (havent tested other browsers yet). Anybody know how to add firefox support in?

      2. The mousewheel only works when the mouse is over the scrollbar itself. I would love for it to work when the user is over the div being scrolled as well. I tried giving focus to the scrollbar when the user mouses over the div with onMouseOver="window.document.scrollbarSWF.focus();" , but it doesn't seem to help.

      3. If the user is dragging the scroller and the user leaves the movie area, the movie loses focus and the scrollbar stops (I dont know that there is much that can be done here). Is there anyway for the movie to continue tracking the mouse (the drag tracking) if the user leaves the movie area so it will function as a normal scrollbar would?

      Thanks for any advice on this.

      Jon
        • 1. Re: Im scrolling a div with a flash scrollbar and it works, almost
          abeall Level 3
          Interesting....

          1) I've not had a problem where the mousewheel doesn't work in FireFox, but it doesn't work on the Mac in general.

          2-3) There's no convenient way around this. Something crazy you could consider doing is to use Flash 8 and ExternalInterface. Basically, you could use JavaScript to do all the listening for mousewheel actions, then report them to Flash via ExternalInterface. But it might be easier and safer to just put the whole content area in Flash, or leave it as a normal HTML/Browser scrollbar, as ugly as they are.