User Guide
Setting component parameters 55
Setting component parameters
Each component has parameters that you can set to change its appearance and behavior. A
parameter is a property that appears in the Property inspector and Component inspector. The
most commonly used properties appear as authoring parameters; others must be set with
ActionScript. All parameters that can be set during authoring can also be set with
ActionScript. Setting a parameter with ActionScript overrides any value set during authoring.
All version 2 User Interface (UI) components inherit properties and methods from the
UIObject and UIComponent classes; these are the properties and methods that all
components use, such as UIObject.setSize(), UIObject.setStyle(), UIObject.x, and
UIObject.y. Each component also has unique properties and methods, some of which are
available as authoring parameters. For example, the ProgressBar component has a
percentComplete property (ProgressBar.percentComplete), and the NumericStepper
component has
nextValue and previousValue properties (NumericStepper.nextValue,
NumericStepper.previousValue).
You can set parameters for a component instance using the Component inspector or the
Property inspector (it doesnât matter which panel you use).
To enter an instance name for a component in the Property inspector:
1. Select Window > Properties > Properties.
2. Select an instance of a component on the Stage.
3. Enter an instance name in the text box under the word Component.
Itâs a good idea to add a suffix to the instance name that indicates what kind of component
it is; this makes it easier to read your ActionScript code. In this example, the instance
name is states_cb because the component is a combo box that lists the U.S. states.