Re: [Flashcoders] External text from XML file including superscript and italic
Paul, I think it IS possible. Especially if you know what exactly will be in superscript. 1) As for italic, you can just use i tag or font-style CSS attribute. 2) As for TM in superscript - in some fonts trade; symbol is superscript by default. You can always use this font if the string contains TM and embed the symbol to be sure :-). -- Best regards, Gregory_GOusable http://GOusable.com Flash components development. Usability services. Paul Steven wrote: I have a flash page that includes several sections of text that are read in from an XML file. I have worked out how to do this assuming all the text formatting is one style. However I would like some of the text to be in italic and it to include the TM as superscript. Ideally I could just write the text in the xml file as I want it to appear on screen in the flash movie. Can anyone advise me if this is possible and how. Or if it isnt possible then what is my best option. Basically the client will be updating the content of the site by replacing the xml files and the text needs to have italics and superscript. I do hope this is possible:) Many thanks Paul ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] External text from XML file including superscript and italic
It IS possible. You can define any CUSTOM tag instead of span: //create a style this.createTextField(my_txt, 1, 100, 100, 300, 100); var my_style:TextField.StyleSheet = new TextField.StyleSheet(); my_style.parseCSS(redtext {color:#FF}); my_txt.styleSheet = my_style; my_txt.htmlText = There can be redtextspecial/redtext fragment in text; With external CSS it's exactly the same. -- Best regards, Gregory_GOusable http://GOusable.com Flash components development. Usability services. Paul Steven wrote: With regards your example Wade, putting all the font info with the text seems to go against the overwhelming purpose of CSS and how it has separated content from styling. Hence I was thinking it may be possible to put some sort of css style type of thing in the XML file rather than the precise font sizes and details. This is probably not possible but it would be nice if it is? Thanks Paul ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders