F > FScrollPane (component) |  |

FScrollPane (component)

FScrollPane, component

The ScrollPane component in the Flash authoring environment provides drag-and-drop functionality for adding scroll panes to display movie clips in Flash documents; it also provides a user interface for setting basic parameters. The methods of the FScrollPane component allow you to control scroll panes at runtime: you can create scroll panes, control scroll panes created in authoring, set or override basic parameters, and set additional runtime options. You do not need to use a constructor to access the methods of components.

The ScrollPane component provides vertical and horizontal scroll bars that let you display large movie clips without taking up much Stage space. Standard mouse and keyboard controls are built in.

Note: The ScrollPane component only displays movie clips; to add scroll bars to dynamic and input text fields, use the ScrollBar component. The ScrollPane component cannot display any content that uses device fonts.

Component methods do not perform error checking for type, as do other native ActionScript objects and actions; therefore, it is recommended that you validate parameters before passing them to methods.

The ScrollPane component is supported by Flash Player 6 and later versions of the Flash Player.

For information on using the ScrollPane component, setting parameters during authoring, and changing the color and appearance of components, see Customizing component colors and textand Customizing component skins in the Using Components chapter of Using Flash.

Method summary for the FScrollPane component

Method | Description
--- | ---
`FScrollPane.getPaneHeight` | Returns the height of the scroll pane.
`FScrollPane.getPaneWidth` | Returns the width of the scroll pane.
`FScrollPane.getScrollContent` | Returns an instance of the content displayed in the scroll pane.
`FScrollPane.getScrollPosition` | Returns the x and y coordinates of the current scroll position.
`FScrollPane.loadScrollContent` | Loads a SWF or JPEG into the scroll pane.
`FScrollPane.refreshPane` | Resizes the scroll bars on the scroll pane when the content changes size.
`FScrollPane.registerSkinElement` | Registers a skin element to a property defined for a skin in the Read Me layer located on Frame 1 of a skin movie clip in the library.
`FScrollPane.setDragContent` | Sets the content of the scroll pane as draggable.
`FScrollPane.setHScroll` | Sets the horizontal scrolling style for the scroll pane.
`FScrollPane.setScrollContent` | Sets a movie clip as the scroll pane target.
`FScrollPane.setScrollPosition` | Causes the pane to scroll to the specified x, y coordinates.
`FScrollPane.setSize` | Sets the width and height of the scroll pane, in pixels.
`FScrollPane.setStyleProperty` | Sets a single style property for a component.
`FScrollPane.setVScroll` | Sets the vertical scrolling style of the scroll pane.