You cannot change CSS at runtime except via the setting of styles, as you have indicated.
 
However, if restarting the application is acceptable, simply replace the CSS file on the server, and refresh the browser.
 
----- Original Message -----
Sent: Wednesday, April 06, 2005 1:13 PM
Subject: [flexcoders] Dynamically Changing an entire CSS

After searching the mailing list archives I cannot seem to find a good answer for this question so I thought I'd re-ask it and see if it could get some additional feedback.
 
We have multiple VERY extensive CSS files.  We'd like to be able to dynamically switch between the CSS files at run time.  So far the only solution that I have been able to come up with is to use the JSP Flex tag library to generate the main mxml application file and dynamically set the CSS file there.  I only need to set this once, during the application initialization.  If the CSS preference is changed, it is acceptable to restart the application.  I saw some rather hackish ways of programmatically going through and resetting the style on individual items in the application, but this is very large application and that's just impractical.  Ideally we just need to change the CSS.  Is there no way to do this in MXML/ActionScript?  Is this just a missing feature that we might expect fixed/added in a future version?
 
Thank you,
 
-- Matthew


Yahoo! Groups Links

Reply via email to