Scroll Method (FlexContainer)

Action

Dispatched when the user manually scrolls the container.

The event is dispatched when the scroll position is changed using either the mouse (e.g. clicking on the scrollbar's down button) or the keyboard (e.g., clicking on the down-arrow key). However, this event is not dispatched if the scroll position is changed programatically (e.g., setting the value of the horizontalScrollPosition property). The viewChanged event is delivered whenever the scroll position is changed, either manually or programatically.

At the time when this event is dispatched, the scrollbar has been updated to the new position, but the container's child objects have not been shifted to reflect the new scroll position.

Syntax

container.Scroll(position, direction, detail)
Variable Description
position Contains the new scroll position. Integer.
direction Contains the scroll direction, either ScrollEventDirection.HORIZONTAL or ScrollEventDirection.VERTICAL. FlexScrollDirection.
detail Provides the specifics of the type of scroll activity. Constants for the possible values are provided in the ScrollEventDetail class. FlexScrollDetail.