1 Reply Latest reply on Jul 11, 2007 4:27 PM by ikkyo

    Apply styles to dynamic text

      I'm dynamically loading text (from a .txt file) into a TextArea at run time via a URLLoader. The text is htmlText within the TextArea. I'm using a TextArea (editable = false) so I can get scroll bars if I need them. I have an external style sheet in which I have the basic styles for the TextArea defined. These styles are applied, but I can't get class styles (for example styles for h1) to apply. Within my .txt file, the basic html tags work (<b>bold</b>), but when I try to apply specific styles either as a type selector or as a class selector, these styles don't show up in the text that fills the TextArea.

      I've tried loading a style sheet at run time using StyleManager.loadStyleDeclarations('styles.swf'). I've tried creating a style sheet using ActionScript and the StyleSheet object. Anyone have any other suggestions?