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: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of girish_ok
Sent: 22 November 2007 07:51
To: [email protected]
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

 

Reply via email to