flex 4 如何在运行时而不是在编译时动态更改 Flex 主题?
flash builder 4 附带了几个很酷的 Spark 主题,网络上还有大量其他主题,我希望能够在运行时更改主题,而无需重新编译。
这可能吗?
如果是,您是否有任何关于如何实现这一目标的提示?
提前致谢 加里
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以将 css 文件编译到 swf 中,然后在运行时加载它。查看 IStyleManager.loadStyleDeclarations。另一方面,如果您指的是 Halo 和 Spark 等主题,则这些主题无法在运行时交换。所以你只能选择用哪一个来编译它。
有关更多信息,请查看 Adobe 论坛上的线程。
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.