I have a web site with flex, now I need to apply diferent styles for the same site.
I have a ConfigApp class, with the function getResorcesPath()
I tried to use:
<mx:Style source=开发者_开发知识库"{ConfigApp.getResourcesPath()}/styles.css"/>
But the error shows up "Data binding expressions not supported with attributes processed at compile time.".
How can I make the mx:Style "dinamic"?
How can I make the mx:Style "dinamic"?
You can't. It is a compile time value; and needs to compile those styles into the app.
However, there is a way. You should review the documentation on loading style sheets at run time . Based on the instructions, you should:
First compile your style sheet into a SWF.
Second, load the SWF using the StyleManager.loadStyleDeclarations method.
精彩评论