You can easily skin a Flash component using only ActionScript using component’s method setStyle() providing as parameters:

  1. the name of the style and
  2. your class that you want to use as the skin.

Here is the list of the styles that can be used for skinning a component:

ComboBox component styles

cellRenderer

disabledSkin

downArrowDisabledSkin

downArrowDownSkin

downArrowOverSkin

downArrowUpSkin

downSkin

thumbArrowUpSkin

thumbDisabledSkin

thumbDownSkin

thumbIcon

thumbOverSkin

trackDisabledSkin

trackDownSkin

trackOverSkin

trackUpSkin

upArrowDisabledSkin

upArrowOverSkin

upArrowUpSkin

upSkin

Information for any of the above styles of the ComboBox component can be found in the Flash Help for the ComboBox class.

The code for skinning is:

myComboBox.setStyle("upArrowUpSkin", CustomUpArrowUpSkin);

Where CustomUpArowUpSkin is the class of your custom upArrow skin for Up state of the up arrow button.

to be continued…

  • Share/Bookmark
2 Responses to “[AS3] Skinning Flash Components”
  1. Tamer says:

    How do you skin Slider component and make the thumb bigger?.
    Thanks

  2. SikoTiko says:

    Hi, Tamer! Thanks for your comment! I made some experiments with the Slider component and found the way to change the thumb properties like width, height, etc. Check out the second part of the series about skinning flash components at [AS3] Skinning Flash Components – Part II.

  3.  
Leave a Reply


TxEff - The Flash Text Effects