我有一个Flex移动项目,有两个不同的样式表:
- theme1.css(包含主题1的所有css)
- theme2.css(包含主题2的所有css)
项目一次只需要导入一个样式表。
如何创建一个按钮在两个样式表之间切换并刷新屏幕?
谢谢菲尔。
switch (this.themeSelected) {
case 0:
this.styleManager.loadStyleDeclarations("../light.swf", true);
break ;
case 1:
this.styleManager.loadStyleDeclarations("../alt.swf", true);
break ;
case 2:
this.styleManager.loadStyleDeclarations("../dark.swf", true);
break ;
case 3:
this.styleManager.loadStyleDeclarations("../impaired.swf", true);
break ;
}
你需要将你的css编译为swf,右键单击Flash Builder Burrito中的文件并检查编译为swf选项