2 Replies Latest reply on Mar 8, 2011 6:01 AM by chinchiheather

    Flex List Scroll Speed With Mouse Wheel

    chinchiheather

      I have a custom class that extends List which I am using as a container. However, the scroll speed is too fast on the mouse wheel, as in it scrolls loads even if you only move the wheel a tiny bit. I tried adding an event listener to my list for MouseEvent.MOUSE_WHEEL and setting the value of event.delta but this has had no effect. Does anyone know how I can make it slower?

       

      My custom class is nothing special, I just created it so I could have a different itemRenders for different item types. It looks like:

       

      public class MultipleRenderersList extends List
      {
           override public function createItemRenderer(data:Object):IListItemRenderer
           {
                if (data is IRenderable)
                {
                     return data.getDiaryRenderer();
                }
                else if (data is Array) 
                {
                     if (data.length > 0)
                     {
                          if (data[0] is IRenderable)
                          {
                               return data[0].getDiaryRenderer(data);
                          }
                     }
                }
                return null;
           }
      }