F > FScrollPane.registerSkinElement

 

FScrollPane.registerSkinElement

Availability

Flash Player 6.

Usage

myScrollPane.registerSkinElement(element, styleProperty)

Parameters

element A movie clip instance.

styleProperty The name of an FStyleFormat property.

Returns

Nothing.

Description

Method; registers a skin element to a style property. Skin elements are registered to properties in the first frame of the Read Me layer of each skin the library.

Components are made up of skins, and each skin is composed of several skin elements, each of which can be registered to a property of the FStyleFormat object. These properties are assigned values by the style format assigned to a component. By default, all Flash UI components are assigned the globalStyleFormat object, which is an instance of the FStyleFormat object.

Use this method to register custom skin elements and properties to Flash UI or custom component skins by editing the code in the first frame of the Read Me layer of a skin in the library.

The FScrollPane component uses the skins in the FScrollBar Skins folder and the FLabel skin in the Global Skins folder once you've added the component to the Flash document. Editing any of the skins in the FScrollBar Skins folder affects all the components that use scroll bars (ComboBox, ListBox, ScrollBar, and ScrollPane).

For more information, see Customizing component skins in the Using Components chapter of Using Flash.

Example

The following code registers the custom skin element NewArrow_mc to the arrow property in the first frame of the Read Me layer of the fsb_downArrow skin in the FScrollBar Skins folder in the library.

Pane1.registerSkinElement(NewArrow_mc, "arrow");

See also

FStyleFormat (object)