1 Reply Latest reply on Jun 5, 2007 2:54 PM by sandersky

    Theme Help

    sandersky
      I have a project with a theme switcher but there is one problem. Some of the themes embed a background image in the Application and if I switch back to a theme that doesn't have a background image embedded it still displays the background image from the previous theme. I need to know how to solve this. I tried setting the background image property to none in the theme that doesn't have a background image but then I lost my gradient background and it displayed a solid color background. Is there maybe someway to tell it to clear current CSS setting before I grab the new CSS. Here is my switcher function:

      private function themeSwitcher():void
      {
      var panelTitle:String = this.ThemeCombo.selectedItem.label;
      var name:String = this.ThemeCombo.selectedItem.data;
      var styleEvent:IEventDispatcher = StyleManager.loadStyleDeclarations( name, true );
      }
        • 1. Re: Theme Help
          sandersky Level 1
          Update
          I have discovered the following:

          StyleManager.unloadStyleDeclarations(name, true);

          I believe this should work but I need to figure out how to get the current css file so that I can use this function to unload it.