Apache flex 在两个样式表之间动态更改

Apache flex 在两个样式表之间动态更改,apache-flex,actionscript,air,Apache Flex,Actionscript,Air,我有一个Flex mobile项目,有两个不同的样式表: theme1.css(包含主题1的所有css) theme2.css(包含主题2的所有css) 项目一次只需要导入一个样式表 如何创建在两个样式表之间切换并刷新屏幕的按钮 谢谢 菲尔 您需要通过右键单击FlashBuilderBurrito中的文件并选中CompiletoSWF选项,将css编译为swf switch (this.themeSelected) { case 0:

我有一个Flex mobile项目,有两个不同的样式表:

  • theme1.css(包含主题1的所有css)
  • theme2.css(包含主题2的所有css)
项目一次只需要导入一个样式表

如何创建在两个样式表之间切换并刷新屏幕的按钮

谢谢 菲尔

您需要通过右键单击FlashBuilderBurrito中的文件并选中CompiletoSWF选项,将css编译为swf

    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 ; 

    }