|
YOUR FEEDBACK
Did you read today's front page stories & breaking news?
SYS-CON.TV SYS-CON.TV WEBCASTS |
TOP COLDFUSION LINKS CF & Flex Adobe Flex Interface Customization - Themes, Styles, Skins
The basics of themes, styles, and skins
By: Tariq Ahmed
Jun. 12, 2007 11:15 AM
The designer approach would be to modify the graphical aspects of a theme, a laborious process of editing many items in various Flash source files ("FLAs") using the Flash Professional IDE. The second approach let advanced Flex programmers create extremely customized interfaces; however this approach made it difficult for designers and developers to hand off the graphical "assets" of a project. In Flex 2 things got a whole lot easier. In this article we'll look at the basics of changing the look-and-feel of your Flex application by introducing Flex Themes, Styles, and Skins. Terminology Themes are simply a collection of style definitions, images (a k a graphical assets), and skins. Themes give you a lot of control and convenience in terms of how you package it all together and distribute it. You can distribute your theme as separate individual files, or ideally compile it into a theme SWC (commonly pronounced as "swick," a sort of JAR/ZIP-like archive format for Flash). Styles are similar to the CSS you've been using for your Web applications. In fact, Flex's styles follow the CSS 2.0 syntax and support many of the common style properties that you're used to. Although many of the visual components and controls support a variety of style properties that let you control fine-grain details like the corner radius of a button, fill gradients, and transparency. They're still based on a certain look; using skins you can completely alter the graphics and interface behavior. Out of the Box In HTML you can assign predefined colors like Red and Blue to certain CSS properties. Flex supports the same thing, but includes four interesting colors ready-to-use. They include:
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" themeColor="haloOrange"> You can also do this on a per-component instance basis as well. For example: <mx:Button label="My Button" themeColor="haloGreen"> Now don't get too excited. The difference is rather subtle in that the most noticeable change is when you mouse over various components. In the case of the button it changes the outer highlight, and with the Datagrid (see the graphic below) it changes the Header column. Fortunately there's a much more dramatic change that you can employ with the out-of-the-box themes. The themes that come with Flex 2 are:
CFDJ LATEST STORIES . . .
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
|
SYS-CON FEATURED WHITEPAPERS MOST READ THIS WEEK |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||