Skip navigation
lrtneu
Currently Being Moderated

How to increase the stepSize of a spark scroller?

May 4, 2010 2:49 AM

Hello from France,

 

I set a scroller on a windowdedApplication.

I can't figure how to increase the speed of a mouseWheel scroll. By default, it seems that one step scrolls by one pixel only.

 

Any idea?

 

Thanks by advance.

 

L. N.

 
Replies
  • Currently Being Moderated
    May 4, 2010 5:19 PM   in reply to lrtneu

    You probably want to look at customizing the VScrollBar.mouseWheelHandler() method.  Attached is a sample of how to do that.

     

    If you would like an easier way of doing this please file an enhancement request at http://bugs.adobe.com/flex

     
    |
    Mark as:
  • Currently Being Moderated
    May 11, 2010 2:36 PM   in reply to Shongrunden

    Thank you.

     

    FTQuest

     
    |
    Mark as:
  • Currently Being Moderated
    May 30, 2010 4:45 AM   in reply to Shongrunden

    Hello,

    I tried the same with a HSlider but my knowledge is still to less to be able to overwrite the mouseWheelHandler.

     

    This seems not to be working with the HSlider?

     

    override mx_internal function mouseWheelHandler(event:MouseEvent):void

     

    For deeper understanding, is there somewhere a tutorial how to approch those kind of thinks ?

     

    How to find those function? Where do I get this 'mx_internal' ?

    How do I find the mouseWheelHandler of the <s:HSlider?

     

    If I have understood that once it would be much easier.

     

    Thank you very much

    Marc

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 5, 2011 5:32 PM   in reply to lrtneu

    An alternative solution is to subclass Group and override theIViewport method getVerticalScrollPositionDelta to return a pre-set step size, then use that subclass as the viewport for your scroller. Much simpler than mucking about with the scrollbar implementation!  Full details in this post right here: http://forums.adobe.com/message/3844410#3844410

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 4, 2013 9:58 PM   in reply to K-spar

    I just saw in the GroupBase that it takes the value of it's layout's getVerticalScrollPositionDelta method. So you could just extend BasicLayout and override that method which would be a bit cleaner and more future proof I think

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points