ActionScript 2.0 Components Language Reference |
|
|
|
| Button component > Customizing the Button component > Using skins with the Button component > Using movie clips to customize Button skins | |||
The example above demonstrates how to use an ActionScript class to customize the Button skin, which is the method used by the skins provided in both the Halo and Sample themes. However, because the example uses simple colored boxes, it is simpler in this case to use different movie clip symbols as the skins.
To create movie clip symbols for Button skins:RedButtonSkin.The identifier is automatically filled out with RedButtonSkin.
mx.skins.SkinElement.The SkinElement class resizes the content as appropriate.
toggled property value to true to see all three skins.
onClipEvent(initialize) {
falseUpSkin = "BlueButtonSkin";
falseDownSkin = "GreenButtonSkin";
falseOverSkin = "BlueButtonSkin";
falseDisabledSkin = "BlueButtonSkin";
trueUpSkin = "RedButtonSkin";
trueDownSkin = "RedButtonSkin";
trueOverSkin = "RedButtonSkin";
trueDisabledSkin = "RedButtonSkin";
}
|
|
|
|