Example in hand: I need to build a Flex app that is configurable in appearance via a CMS. I figured that it would be great to use an external stylesheet for this and generate that from the CMS. But reading Ted's post I now realize that Flex CSS styles are compiled into the SWF, not loaded and somehow processed at runtime. Am I correct here? I assume that's the case because when I remove the CSS folder from my bin directory I still see my styles, so the CSS is not external after all...!? Sorry but I assumed it was, at least that's how I expetced it to work.
So what do I do? Do I need to save my styles in XML for example, load the XML at startup and then set colors? I'd call that a step in the wrong direction (the German's have a saying for that which goes somewhat like: 'from behind through the chest into the eye').
Or is this a job for FDS (in which case it's overkill as the rest of the app won't need it). Thoughts? I am sure there are many use cases for stylising Flex apps without having to compile CSS SWFs or even the entire app itself...


http://www.scalenine.com/samples/themeSwapper/them...
Do let me know if you come across anything.
The details are here:
http://www.adobe.com/devnet/logged_in/mchotin_flex...
In your case, you seem to only care about changing colors at runtime. A few months back, I was able to write a class to parse stylesheets (with a little RegEx). Unfortunately, I cannot share my code because it belongs to my former employer, but it only took me about a day to get it working. You just need to get the styles from the file and their new values and use StyleManager, CSSStyleDeclaration, or the setStyle function to get things going.
but look at how those CSS SWF files are generarated... they must be present at compile time. Or are you saying I can change a CSS text file and flex will reflect those changes everytime the swf is run?
http://www.rubenswieringa.com/blog/cssloader