Creating A Custom Rectborder Implementation - MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference

Components language reference
Table of Contents

Advertisement

Creating a custom RectBorder
implementation
The RectBorder class is used as a border skin in most ActionScript 2.0 components. The
default implementations in both the Halo and Sample themes use ActionScript to draw the
border. A custom implementation must use ActionScript to register itself as the RectBorder
implementation and provide sizing functionality, but can use either ActionScript or graphic
elements to represent the visuals.
Each RectBorder implementation must comply with the following requirements:
It must extend mx.skins.RectBorder or one of its subclasses.
It must provide an
to return sizing information.
It must implement the
It must support all four standard styles, as well as the four special styles.
The implementation can reuse standard borders for special borders, as the Sample
theme does.
It must register itself as the RectBorder implementation.
RectBorder global registration
All components look to a central location for a reference to the RectBorder class in use for the
document,
_global.styles.rectBorderClass
component should use a different RectBorder implementation. To customize RectBorder for a
component, you must rely on the
Custom RectBorder example
The RectBorder implementations provided by the Halo theme and the Sample theme use the
ActionScript drawing API to draw the borders for different styles. The following example
demonstrates how to create a custom RectBorder implementation that uses graphic symbols
for its display.
property value or implement the
offset
method to draw or size the border.
drawBorder()
borderStyle
getBorderMetrics
. You cannot specify that an individual
style property.

Creating a custom RectBorder implementation

method
1067

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents