Example 1 Example one shows a simple, code-based approach to the ScrollPane. Content is added via the ScrollPane's source setter. All the functionality for this ScrollPane is included in the BaseScrollPane class, so the library symbol's base class linkage is set to "com.exanimo.containers.BaseScrollPane" and the class is auto-generated. Similarly, the ScrollBar symbols' base class linkage is set to "com.exanimo.controls.BaseScrollBar." Example 2 Example two is similar to Example 1, but no code is required. Instead, the content is added as a child of the ScrollPane in the authoring environment and given an instance name of "_content". In this case, the content is a TextField, but it can be any DisplayObject. As in Example 1, there is no additional functionality required, so the symbols' base class linkages are set to "com.exanimo.containers.BaseScrollPane" and "com.exanimo.controls.BaseScrollBar." Example 3 Example three demonstrates updating of the ScrollPane. To update a ScrollPane, call its update method. It is necessary to update a ScrollPane whenever the size of its content changes. (This is the same as Adobe's ScrollPane.) Example 4 Example four is identical to example one in all but one respect: the scaleThumb property of the ScrollPane's ScrollBars is set to false. Since many custom ScrollBar designs call for thumbs that do not scale, the ScrollBar.scaleThumb property provides a simple way to prevent them from scaling (which is the default behavior). Example 5 Example five demonstrates disabled ScrollBars. When a ScrollBar is visible but cannot scroll, its enabled property will be set to false. If you are extending BaseScrollBar, the enabled property of the down arrow, up arrow, thumb, and track will all be set to false (if they exist and have an enabled property). NOTE: Because the VerticalScrollBar and HorizontalScrollBar are different symbols, Flash does not allow their base class linkage to be set to the same class. Doing so will result in the following compiler error: Warning: All instances named '_thumb' will be automatically declared as VerticalScrollBarThumb in symbols that use com.exanimo.controls.ScrollBar as their base class. In symbols that are linked to user-defined base classes, instances with the same name must be of the same type. To avoid this, simply create stub classes that extend "com.exanimo.controls.ScrollBar" and set your library symbols' class linkages to them. (See HorizontalScrollBar.as and VerticalScrollBar.as -- neither class has any body; they just extend "com.exanimo.controls.ScrollBar") Example 6 Example six is identical to example one, except the ScrollPane clip is linked to the class EasingScrollPane. EasingScrollPane extends BaseScrollPane and overrides the protected moveContent function to give custom easing to the ScrollPane. This example demonstrates how easy it is to add functionality to the ScrollPane by extending the BaseScrollPane class. This example uses the Tweener library, which is available at .