Saturday, May 5, 2007

flash.text.TextField.flashrichtext

flashrichtext is an xml schema that flash sometimes adheres to when passing around formated text.

An example of the flashrichtext format of "Hello World" looks like this:
<flashrichtext version="1">
  <textformat font="Arial" size="14" color="0" bold="false" italic="false" underline="true" url="" target="" align="left" leftmargin="0" rightmargin="0" indent="0" leading="2" blockindent="0" kerning="false" letterspacing="0" display="block">(Hello )</textformat>
  <textformat font="Arial" size="14" color="16711680" bold="false" italic="false" underline="true" url="" target="" align="left" leftmargin="0" rightmargin="0" indent="0" leading="2" blockindent="0" kerning="false" letterspacing="0" display="block">(World)</textformat>
</flashrichtext>

As you can see, the root node is "flashrichtext." Each child node represents a run of text (a continuous segment of text which has a single text format). The attributes of the node define the format using the same formating names as flash.text.TextFormat, and the text of the node is the text itself surrounded by parentheses.

3 comments:

Matyas said...

It does not seem to store the "bullet" attribute. Im trying to figure out where that one gets stored now

Unknown said...

I've copied some of this text from the chat window of an online seminar. How can I properly display this in human readable format?

Unknown said...

I found that I could paste it right into XMLCopyEditor and see cleartext.

"Flex", "ActionScript" and possibly "MXML" are probably trademarks of Adobe Systems Incorporated.
"Adobe" is a trademark of Adobe Systems Incorporated.
This site is in no way endorsed or sponsored by Adobe Systems Incorporated.
Content Copyright © 2007 Daniel Freiman.
Site Design Copyright by its copyright holder.
The Flex Non-Docs reserves the right to remove comments for any reason.
All ActionScript and MXML code (and ONLY ActionScript and MXML code) on this website is available under the MIT License.