Customizing the ProgressBar component

You can transform a ProgressBar component horizontally both while authoring and at runtime. While authoring, select the component on the Stage and use the Free Transform tool or any of the Modify > Transform commands. At runtime, use UIObject.setSize().

The left cap and right cap of the progress bar and track graphic are a fixed size. When you resize a progress bar, the middle part of the progress bar resized to fit between them. If a progress bar is too small, it may not render correctly.

Using styles with the ProgressBar component

You can set style properties to change the appearance of a progress bar instance. If the name of a style property ends in "Color", it is a color style property and behaves differently than non-color style properties. For more information, see Using styles to customize component color and text.

A ProgressBar component supports the following Halo styles:

Style

Description

themeColor

The background of a component. This is the only color style that doesn't inherit its value. Possible values are "haloGreen", "haloBlue", and "haloOrange".

color

The text of a component label.

disabledColor

The disabled color for text.

fontFamily

The font name for text.

fontSize

The point size for the font.

fontStyle

The font style; either "normal" or "italic".

fontWeight

The font weight; either "normal" or "bold".

textDecoration

The text decoration; either "none" or "underline".

Using skins with the ProgressBar component

The ProgressBar component uses the following movie clip symbols to display its states: TrackMiddle, TrackLeftCap, TrackRightCap and BarMiddle, BarLeftCap, BarRightCap and IndBar. The IndBar symbol is used for an indeterminate progress bar. To skin the ProgressBar component while authoring, modify symbols in the library and re-export the component as a SWC. The symbols are located in the Flash UI Components 2/Themes/MMDefault/ProgressBar Elements folder in the library of the HaloTheme.fla file or the SampleTheme.fla file. For more information, see About skinning components.

If you use the UIObject.createClassObject() method to create a ProgressBar component instance dynamically (at runtime), you can also skin it dynamically. To skin a component at runtime, set the skin properties of the initObject parameter that is passed to the createClassObject() method. The skin properties set the names of the symbols to use as the states of the progress bar.

A ProgressBar component uses the following skin properties:

Property

Description

progTrackMiddleName

The expandable middle of the track. The default value is ProgTrackMiddle.

progTrackLeftName

The fixed-size left cap. The default value is ProgTrackLeft.

progTrackRightName

The fixed-size right cap. The default value is ProgTrackRight.

progBarMiddleName

The expandable middle bar graphic. The default value is ProgBarMiddle.

progBarLeftName

The fixed-size left bar cap. The default value is ProgBarLeft.

progBarRightName

The fixed-size right bar cap. The default value is ProgBarRight.

progIndBarName

The indeterminate bar graphic. The default value is ProgIndBar.