• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Part: II Skinning Components > Setting Styles on a Single Component

Chapter 11. Setting Styles on a Single Component

DO OR DIE

  • Change the color (not the shape) of parts of a single component instance.

  • Change the color of only some, not all, parts.

  • Use component.setStyle().

  • Use style objects and styleName.

All you can do using ActionScript alone is change the color of certain component parts: text, background color, border, and so on. Only some of these parts can be changed using ActionScript, so if you want to really muck with the appearance of a component, you have to skin it, which is discussed in Topic 14, Skinning Components. It's definitely more involved than setting styles. So, if you want to alter the appearance of a component, try setting styles through ActionScript first. If that doesn't work, move on to skinning.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint