Flash CS3 Documentation |
|||
| Using ActionScript 2.0 Components > Working with Components > 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).
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.
Flash CS3