views:

268

answers:

1

my question consists of tow parts

**1- why we need skins for every elements if we can style our application using CSS file. for example in theme Graphite in SDK's Sample consists of both CSS+.fla and skins---.mxml files.

2- How we can create a whole theme with out coding CSS.**

+1  A: 

1) Skins and CSS serve different purposes. Skins do the actual programmatic drawing of the graphic elements, while css styles allow you to customize certain variables in those skins. For example, the halo skins use the borderStyle, borderColor styles to allow the user to use the same skin on multiple components, and allow the developer to make subtle changes w/o creating new skin files. So while you could create a theme w/o overriding the default skins, or have a theme that's just skins, you're really best served by having both. For example, an application I'm currently building has many instances of the same button style, but all the buttons are different styles. For this button, I wrote a base button skin that accepted a backgroundColor parameter, and using this backgroundColor parameter, i was able to create different coloured buttons with similar appearances.

2) Write skins with default or hard coded values. Not sure why you'd want to do this though.

quoo
actually i want to create the whole theme for my AIR application. so i thought there should be a method for creating theme visually. now one question pleasehow we can embed the over,up,down etc skins defined as sybols in a .swf file. i mean in skin how can i specify
Muhammad Husnain Ashfaq
Oh, well if you want to create the theme in a visual editor, I'd suggest looking into flash catalyst. or if you just want to create png or swf based skins, look into the flash skinning extenions
quoo