views:

233

answers:

1

Hi community,

I added an external stylesheet file (css) to my flex project. Is there a possibility that the css is not compiled with the swf? It would be great if I could put the swf on my webspace and afterwards only change a css file to customize my application and fit it to the colors of my homepage.

Thanks in advance

Sebastian

+3  A: 

Yes thats exaclty what happens. Right click the CSS in your flex project and click 'compile to swf' then when you build your app you will see the CSS file as a SWF file in the same folder structure but in the bin-release folder.

So next time you update the CSS, you just upload the updated CSS-SWF file. This is providing that you load in the CSS-SWF file at runtime. If your app doesn't load the CSS_SWF at runtime it will still contain whatever styles it had when you built the app in the first place.

check out http://blog.flexexamples.com/2007/12/12/loading-cascading-style-sheets-on-the-fly-using-the-flex-stylemanager-class/ for more info on runtime loading of CSS.

kenneth