I would guess MM chose to force users to set the styles as a sep. AS file (which I think is how css values are converted) at compile time rather than slow down the user's box with setStyle() at runtime. setStyle() is extraordinarily CPU intensive. I could be wrong. I'm diggin' back into memory for this one.



On 5/23/05, Manish Jethani <[EMAIL PROTECTED]> wrote:
On 5/23/05, Richard Butler <[EMAIL PROTECTED]> wrote:

> Has anyone tried loading in a CSS stylesheet dynamically at runtime, or
> know how it could be done? The only way I can think of is using the good
> old Flash way using TextField.StyleSheet's parseCSS() and then doing a
> few loops, but is there a more up-to-date method within Flex?

Yes, styles specified in the Style tag are compiled into the SWF.  As
far as I know, the only way to set styles at runtime is to use the
setStyle() method.  See this thread:
http://www.mail-archive.com/[email protected]/msg04682.html



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/






Yahoo! Groups Links

Reply via email to