1 Reply Latest reply on Jul 28, 2010 12:57 AM by Shongrunden

    follow scroller verticalScrollPosition while drag the scroll bar

    Vie Bone

      Hello!

       

      I'm trying to make a box that move with the scroll, it works fine if I use the wheel or click on the scroll arrows, but if I drag the bar, until I don't stop dragging the box does't move, and you see a jump from the box initial position to the new position.

       

      I set up a PropertyChangeEvent to the scroller.viewport:

       

      myscroller.viewport.addEventListener(PropertyChangeEvent.PROPERTY_CHANGE, onChange);

       

      onChange(e:PropertyChangeEvent)

      {

          // here I set the box.y new pos based on the viewport.verticalScrollPosition;

      }

       

      Any Ideas? where is the error?

       

      Thanks a lot!