在运行时更改 Flex 4 主题(CSS+Skin)?
我有一个 Flex 4/Blaze/Java 应用程序,希望为我的用户提供一种在多个预先确定的皮肤之间切换的方法。有谁有一个很好的例子来说明如何做到这一点?
理想情况下,主题列表将由存储主题的服务器提供。或者我是否必须提前将所有可能的主题编译到 swf 中?
I have a Flex 4/Blaze/Java application and would like to provide my users with a way to switch between several pre-determined skins. Does anyone have a good example of how to do this?
Ideally, the list of themes would be provided by the server -- where the themes are stored. Or do I have to compile in all possible themes into the swf ahead of time?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
检查样式表的运行时加载。
您可以将每个样式表及其外观类打包在一个 swf 中,该 swf 可以由您的应用程序在运行时使用 styleManager.loadStyleDeclarations("yourTheme.swf"); 动态加载。
http://help.adobe.com/en_US/flex/using/ WS2db454920e96a9e51e63e3d11c0bf69084-7f8c.html
Check out runtime loading of style sheets.
You can package each style sheet with its skin classes in a swf that can be dynamically loaded by your application at run time using styleManager.loadStyleDeclarations("yourTheme.swf");
http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7f8c.html