Using Components > Customizing component colors and text > Changing properties of a component instance |
![]() ![]() ![]() |
Changing properties of a component instance
You can specify a FStyleFormat
property for a specific instance of a Flash UI component using the setStyleProperty
method available to all Flash UI components. Calling the setStyleProperty
method to set a property overrides the setting for that property only. All other property settings are unchanged. It is recommended that you use a separate layer in the document Timeline to set properties.
It is not recommended to call the setStyleProperty
method multiple times to set more than one property. If you want to change multiple properties, or change properties for multiple component instances, you should create a custom style format. See Changing the properties of specific components.
To set or change a property for a single component instance:
1 |
Select the component instance on the Stage. |
2 |
Create a new layer in the Timeline and give it a name. |
3 |
Select any frame in the new layer. |
4 |
Open the Actions panel in expert mode. |
5 |
Use the following syntax to specify a property and value for the instance: |
componentInstance.setStyleProperty("property", value); |
|
For example, to make the arrow of the |
|
grapeComboBox.setStyleProperty("arrow",
|
|
6 |
Choose Control > Test Movie to view the changes. |
![]() ![]() ![]() |