Flex Text height within a List
There’s a little trick if you’re trying to use a Text component as part of a custom itemRenderer for a List. The Text component will automatically wrap the text and set its correct height. However, when it’s in a list, you may find it gets cut off anyway. You have to set the variableRowHeight attribute of the List to true.
January 9, 2011 No Comments
Getting started with OSMF & Flex 4 on the Linux Command Line
If you’re using Flex on the command line without Flex Builder, the documentation for getting up and running with OSMF is pretty slim. Here’s what has worked for me. (I upgraded to Flex 4 to get access to all of the OSMF features, but you should be able to do this with Flex 3 as well).
First, get the latest OSMF from the downloads page: http://sourceforge.net/adobe/osmf/home/. There’s an older version packaged with Flex 4, but OSMF is evolving very quickly so get the most recent.
Unzip that basically anywhere. It doesn’t fit neatly into the Flex directory structure, and if you try to replace the old OSMF files in the Flex package you’ll have problems building the asdocs, so just pop the new OSMF in the Flex home directory or something.
Now to get Flex to use it you have to tell the compiler where to find it, and add a few tweaks. Here’s my mxmlc command:
mxmlc \ -compiler.source-path=/path_to_new_osmf/framework/OSMF/ \ -define CONFIG::LOGGING false \ -define CONFIG::DEBUG true \ -define CONFIG::FLASH_10_1 false \ -compiler.debug=true \ -static-link-runtime-shared-libraries \ YourFlexApp.mxml
That should get you running! Check out these resources for some basic examples. Keep in mind that since OSMF is changing so quickly, you may have to look around for where this or that package is hiding today…
OSMF + Flex Example [brooksandrus.com]
New Intro to Adobe OSMF Videos [almerblank.com]
December 18, 2010 No Comments
Using Flex 4 with the Flex 3 ‘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.
December 16, 2010 1 Comment










