Benjamin, Create a class (cssl) with a TextField.StyleSheet (tss) attached and utilise its load() or parseCSS() method. Then loop through the CSS style objects created within tss using _css or _style properties (ugly but there doesn't seem to be a function to get these out). For each of these style selector objects, create a CSSStyleDeclaration() at _global.styles[styleName] level and use setStyle() to set each property.
I haven't tested it in-depth yet but it seems to work for most CSS styles I've tried. Cheers, Rich -----Original Message----- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Benjamin Dobler Sent: 23 May 2005 16:13 To: flexcoders@yahoogroups.com Subject: AW: [flexcoders] Re: Loading CSS dynamically at runtime? > I spent an hour or two writing a class that seems to do the trick > using a combination of TextField.StyleSheet and CSSStyleDeclaration - > it can be done... :-) > I would be extremely interested in your approach! Yahoo! Groups Links Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/