4 Replies Latest reply on Sep 30, 2008 4:04 PM by istrasci

    Default background color issue

    kleptomac
      Hi,
      I am trying to change themes at run-time using StyleManager.loadStyleDeclarations(). Whenever I switch to a theme, the default theme's background color shows up for a fraction of a second. I tried using the "StyleEvent.COMPLETE" event handler but it doesn't seem to work. Is there a way to remove this? I want the transition from my current theme to the next theme to be smooth without the default background color appearing. If anybody can please provide a solution for this, It would be a great help.

      Thanks,
      Jai
        • 1. Re: Default background color issue
          Peter Lorent Level 2
          Project -> Properties -> Flex Compiler -> add the default color:
          -default-background-color 0xFFFFFF
          • 2. Re: Default background color issue
            istrasci Level 1
            quote:

            Originally posted by: LuigiL
            Project -> Properties -> Flex Compiler -> add the default color:
            -default-background-color 0xFFFFFF


            That's not what he's talking about... He's saying if you load a CSS file with loadStyleDeclarations(), it will momentarily flash the default, green Halo theme before switching to the new style... If I load up my white theme (White.swf -- compiled to swf from css) and then I want to change to my red theme (Red.swf) like:

            StyleManager.unloadStyleDeclarations("White.swf");
            *
            StyleManager.loadStyleDeclarations("Red.swf");

            At the * point in the execution, it will flash the green Halo theme instead of just making a smooth transition from white to red... It doesn't look so professional...

            I have the same problem when switching themes, and it's very annoying... Guess I'll keep an eye on this thread...
            • 3. Re: Default background color issue
              Peter Lorent Level 2
              >>At the * point in the execution, it will flash the green Halo theme instead
              And using -default-background-color 0xFFFFFF sets that to white...
              • 4. Re: Default background color issue
                istrasci Level 1
                quote:

                Originally posted by: LuigiL
                >>At the * point in the execution, it will flash the green Halo theme instead
                And using -default-background-color 0xFFFFFF sets that to white...


                OK, but the point is, he (and myself as well), don't want any colour to flash when changing between themes. It should just change Colour1->Colour2, not Colour1->(default colour)->Colour2