text layouts and Flash are not bosom buddies for sure. Check this out for possibilities http://labs.adobe.com/technologies/textlayout/
You will most certainly want to externalize your CSS. See Teddy's example and check out this chapter for all the goods http://livedocs.adobe.com/flex/3/html/styles_01.html Douglas Knudsen http://www.cubicleman.com this is my signature, like it? On Fri, Feb 13, 2009 at 4:44 PM, John Waggener <[email protected]>wrote: > When using text in Flex, I commonly create TextAreas, assign marked up text > (htmlText property) to those areas and then apply a StyleSheet. > > I couple of limitations that are frustrating. TextArea doesn't seem to > resize automatically. This means if I have a couple of TextAreas in the > flow of a Box, they may not be large enough for the text. If I assign new > text they do not resize appropriately. I don't find flash's textheight > calculations reliable. > > The flow of text and media. > I do believe that htmlText can contain an img tag, making it part of the > flow. But the range of styles is limited. > > In general, is there a good way, a best practice, to use marked up text and > other uicomponents in a flow? Can text wrap a Ui component that is a > videoplayer? > > Also, can I can use an external CSS to style a TextArea with marked up > text? > > I know that i can set styleName to one style definition. But the point is > to apply any number of styles to any number of tags. > > __textArea.styleSheet = someExternalCss; -- ideally a CSS that is applied > to whole app without explicitly loading. > > Any thoughts or pointers to resources are appreciated. > > What I'm doing: > > private var __info:TextArea; > private var styles:StyleSheet; > private var stylesText:String = > '.h1{ font-family: Arial, Helvetica, Times; font-weight: > regular; color:#ffffff; font-size:20; }'+ > '.regular{ font-family: Arial, Helvetica, Times; font-weight: > regular; color:#ffffff; font-size:14; }'+ > '.link{ font-family: Arial, Helvetica, Times; font-weight: > regular; color:#68b8d6; font-size:14; text-decoration:underline; }'; > > styles = new StyleSheet(); > styles.parseCSS(stylesText); > > __info = new TextArea(); > __info.styleSheet = styles; > > > -- > Johnny Waggener > Software Developer > Multicast Media > 678-592-2650 >
