开发者

Dynamic style, Data binding expressions not supported with attributes processed at compile time

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜