The Button component has a list of parameters, found in the Parameters tab and the Component Inspector, that are designed to allow a UI artist the ability to set some basic button properties without modifying the code. These parameters are:
Figure 5: The Button component parameters in CS3 (Parameters Tab).
Parameters can be added to the list by modifying the Button.as file. This is done by adding an inspectable statement above a member variable or getter/setter function that has a modifiable property such as a Boolean (e.g., true or false). For instance, the following inspectable statement was added directly above the block of code responsible for setting a button’s label, thus allowing the UI artist to set the button label via the Parameters panel within Flash, rather than via code:
[Inspectable(name="label", defaultValue="")]
Directly above the toggle variable in Button.as, is the following inspectable statement, allowing the UI artist to set toggle to true or false via the Parameters tab:
[Inspectable(defaultValue="false")]