Wed 28 Jun 2006
Designing Flex 2 skins using Flash, Photoshop, or Fireworks
Posted by Narciso Jaramillo under design | Flash Builder | Flex12 Comments
Lots of people have reported the news that Flex 2 has shipped (yay!), so I won’t repeat the details here. (Just go download the free Flex SDK or a trial of Flex Builder already! You know you want to.)
Instead, since it’s all about me, I’d like to point out an article I just published on the Flex Developer Center about designing skins for Flex 2 using Flash, Photoshop, or Fireworks. It’s aimed at visual designers who want to use their familiar design tools to customize the Flex components, but Flex developers might find it valuable as well to understand how skinning works.
There are two ways you can customize the look of the components in a Flex application. One way is to start with the built-in “Aeon” look, and tweak an extensive set of styles for each component using CSS; the excellent Flex Style Explorer can give you an idea of how far you can go just doing this. But if you have a specific visual design in mind that you can’t achieve using styles, you can completely change the look of the Flex components by replacing the built-in skins with your own bitmap or vector artwork.
The article provides template files for Flash, Photoshop, and Fireworks that have been set up with the symbol/layer structure you need to generate the different skin parts for each component. Using these files, you can see how the skin parts are structured, replace the artwork in the template with your own skin parts, and export the artwork directly into a Flex project. We’ve also provided a test MXML application that shows how your skins will look at runtime.
In practice, you’ll probably need to use a combination of skins and styles to get exactly the look you want, since things like fonts and text colors aren’t set through the skinning mechanism. The article goes through the styles you’ll commonly need to set in conjunction with your skin artwork.
Hope the article is useful—if you have any feedback, please let me know!
digg this |
del.icio.us | 12 Comments
Your blog comment “it’s all about me” made me laugh, so I had to comment here and tell you that. Since this comment, yes, is all about me.
Hey,
Sure, your article makes sense. It’s nice to meet a guy that focuses on visual designers rather than software designers in Flex world.
Keep on rocking and writing great articles about design in Flex Universe 😉
Hello,
I just stumbled on your article and blog and really glad that I did. I’ve recently started learning Flex 2, and I’m very impressed with all that I’ve seen so far — both in the tool and in the supporting documentation.
Here’s a goofy question though (I don’t have the luxury of doing my learning in an organized/methodical way at the moment): What does the filetype descriptor “.swc” stand for, and where’s the “framework/themes/” directory located?
Maybe I overlooked something…
Hi Paul,
.swc files are the equivalent of library files in other development frameworks. They’re basically binary packages of ActionScript or MXML classes that can be statically or dynamically linked into your application. In Flex Builder, you can create a .swc by creating a Flex Library project.
The theme files are located in the Flex SDK installation folder. (If you installed Flex Builder, the SDK is inside the Flex Builder folder.) The path is:
…/Flex SDK 2/frameworks/themes
Good luck!
Hello nj,
Thanks so much for the reply, and hand-holding… I’m so happy to be back in a more “design-oriented-environment” like Flex2 and it’s matured quite a bit since my last investigation. I had been working in a J2EE environment for some time and it’s… well, much less design-friendly (imho). I hope that my work improves in this better environment!
Anyway, I’m trying to race through all of the tutorial lessons and I’ve opened the .PSD template file that accompanies your article… Wow, this is just amazing stuff — the deeper I delve, the better things seem to be! Thanks so much for sharing.
Thanks for the help as well on the .SWC file question — I figured it was something like that, and as I fumble through things and try to make some progress, I’ll get back into that.
One of my goals is to find out how to control the UI (themes/skins) at different levels… but I can elaborate more on this later I guess.
Best regards…
Hello, I used your Flash template file to edit the skin for ComboBox, and changed the rounding on the corners. I adjusted the scale 9 lines accordingly, but Flash seems to have problems drawing the shape correctly at 100%. I have posted screen caps of the same shape at 100% and zoomed in. Notice it looks perfect once zoomed in.
http://returnundefined.com/files/misc/skinDrawingError.jpg
Is this a bug?
Thanks,
Ben
Hi Ben,
Hmmm, that\’s odd. Are you seeing these artifacts only when you use the symbol as a Flex skin, or do you see the same artifacts at 100% in Flash Authoring?
(It does look like the right edge is slightly weird even in the zoomed in version, but that might be an artifact of your JPG screenshot.)
I\’m not actually familiar with the Flash drawing tools–I know I\’ve had trouble reshaping existing shapes when I\’ve tried to play around with them. You might try redrawing the shape from scratch and seeing if that helps. Also, double-check that the position and size of the shape are integers (i.e., no fractional pixels).
If you don\’t have any luck, let me know; maybe I could get your FLA file and see if one of the Flash gurus around here can figure out what\’s going on. Thanks.
Hi nj, the symbol is distorted in Flex authoring and the published swf as well. Hmmm. I did redraw the shapes from scratch to begin with, because as far as I know you can’t change the corner rounding of an existing shape. Everything is on whole pixels as well.
Unless you’ve got an idea of something else to try I suppose I will just use the Photoshop approach. Flash’s drawing tools have always been pretty horrendous, I was only trying it this way because the workflow seems easier.
When can we expect Flash’s drawing to be an embedded version of Illustrator? 🙂
Thanks,
Ben
Narciso –
Just wanted to let you know that your article helped me very much. I have created a website dedicated to Flex 2 themes, styles, and skins. Thought you might like to see where your some of your shared knowledge has taken me. You can see the site at http://www.scalenine.com.
Thanks.
Juan
Juan: Very cool–nice job with the skins you’ve posted there! It’s nice to start seeing some Flex apps that don’t “look like Flex” 🙂 Thanks for the link.
The theme files are located in the Flex SDK installation folder. (If you installed Flex Builder, the SDK is inside the Flex Builder folder.)
Hello, i have a question: does Scrollbar’s track works when you publish skins from Flash? When i skin scrollbar and click on track scrollbar doesn’t move. Any ideas why?