flex 4 how do I change the flex theme dynamically at runtime, not at compile time?

860 Views Asked by At

flash builder 4 comes with a couple of cool spark themes, and there are tons of others out there on the web, I want to be able to change the theme at runtime, without recompiling.

Is this possible?

If it is, do you have any hint's on how this can be achieved.

Thanks in advance Gary

1

There are 1 best solutions below

0
Drenai On

You can compile a css file into your swf and then load it at run time. Checkout IStyleManager.loadStyleDeclarations. On the other hand if you are referring to themes such as Halo and Spark, those cannot be swapped out at run time. So you are stuck with which ever one you compiled it with.

For further information take a look at this thread on the Adobe Forums.