16 December 2010

Using Flex With The Flex Halo Theme

With Flex 4 comes “Spark”: a much more “flexible” (haha), and in my opinion much less beautiful theme than the one in Flex 3. Of course, you can use Spark to create all sorts of beautiful things, but if you’re looking for something pretty out of the box, it’s not that.

The Flex 3 theme is called “Halo”, and as described here, you can still use it in your application with the inclusion of a compiler argument:

-theme=${flexlib}/themes/Halo/halo.swc

However, I found that there is an annoying bug whereby a warning message is now shown when you compile the application.

frameworks/libs/framework.swc$defaults.css(488): Warning:
The style 'dropShadowVisible' is only supported by type
'mx.controls.List' with the theme(s) 'spark'.

I realize it’s a deplorable hack, but my simple solution is as follows. Open framework.swc (it’s just a zip file), and edit defaults.css. Comment out or delete line 488, save it back to framework.swc, and voilà! No more nasty warning.