STYLEMANAGER METHODS

addStyle

Availability

Flash Player 7.

Description

Adds the StyleFormat to the StyleManager's array of styles stored on the reference string.

Arguments

addStyle(reference:String, format:StyleFormat)

Returns

Nothing

Example

var darkBlock:StyleFormat = new StyleFormat("darkBlock");
darkBlock.face = 0x000000;
styleManager.addStyle("Button", darkBlock);
styleManager.addStyle("DarkBlock", darkBlock);

getStyle

Availability

Flash Player 7.

Description

Returns the StyleFormat instance based on the object passed. Which style is determined by first the object's styleFormatName, then, if that is undefined, by the object's Class, then, if no style exists for the Class, the default format.

Arguments

getStyle(component:Object)

Returns

StyleFormat

Example

var format:StyleFormat = styleManager.getStyle(tree);
tree.updateStyles(format);

getStyleFromReference

Availability

Flash Player 7.

Description

Returns the StyleFormat instance based on the reference string.

Arguments

getStyleFromReference(name:String)

Returns

String

Example

var format:StyleFormat = styleManager.getStyleFromReference("DarkTree");
tree.updateStyles(format);

getStyleReference

Availability

Flash Player 7.

Description

Returns the reference string for the specified StyleFormat instance.

Arguments

getStyleReference(format:StyleFormat)

Returns

String

Example

var formatName:String = styleManager.getStyleReference(tree.styleFormat);
attachMovie("Flashloaded Button", "button", 10, {styleFormatName:formatName});

removeStyle

Availability

Flash Player 7.

Description

Removes the StyleFormat from the StyleManager's array of styles based on the reference string.

Arguments

removeStyle(reference:String)

Returns

Nothing

Example

styleManager.removeStyle("Button");

style

Availability

Flash Player 7.

Description

Styles a component with the current style set based on the component's class or styleFormatName instance property.

Arguments

style(component:Object)

Returns

Nothing

Example

styleManager.style(tree);



STYLEMANAGER PROPERTIES

defaultFormat

Availability

Flash Player 7.

Description

Read only. The default format used for all components when a component has neither a styleFormatName nor a StyleFormat associated with one of its Classed.

Returns

StyleFormat

Example

tree.updateStyles(styleManager.defaultFormat);