You can also use states on the app... <mx:states> <mx:State name="Manager"> <mx:SetStyle name="backgroundGradientColors" value="[#ff0080, #b1c0c7]"/> </mx:State> <mx:State name="Seller"> <mx:SetStyle name="backgroundGradientColors" value="[#ffff80, #b1c0c7]"/> </mx:State> </mx:states>
then set the app state once you know what type of user you are dealing with... app.currentState = "Manager"; --- In flexcoders@yahoogroups.com, "Kenneth Sutherland" <[EMAIL PROTECTED]> wrote: > > You want to create a separate css style sheet for each type of user. > Then have a look at the following > http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhel > p.htm?context=LiveDocs_Book_Parts&file=styles_069_26.html > > > > This will let you change the styling of the app at runtime. So if you > know that the user that just logged in is the manager and your CSS file > for the manager is called 'manager' then you'd do the following - > > StyleManager.loadStyleDeclarations( manager.swf, true ); > > > > > > Take note that you need to compile the css into a swf. Just right click > the css file in flexbuilder and tick the option 'compile css to swf' > > > > Kenneth. > > > > ________________________________ > > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of girish_ok > Sent: 22 November 2007 07:51 > To: flexcoders@yahoogroups.com > Subject: [flexcoders] How to change application background color > dynamically > > > > Hi All, > > In my project I am loading mxml components based on User Roles and > Rights. For each mxml component i have used different colors and > displaying the component in centered screen. > > like > If the user= Manager [background color = blue ] I am loading manager > related component, > If the user= Seller [backgound color = green ] I am loading Seller > related component and etc., > > My main.mxml application is background is different [default color] > When i load component it should reflect the color [change the > background color] in main.mxml application. how can i achieve this >