Skip to main content
Participant
December 14, 2009
Question

Trouble with named formats in last SDK builds

  • December 14, 2009
  • 1 reply
  • 408 views

Hello

i recently installed November 28 SDK 4 nightly build.

I am now getting trouble with named formats, that are no more taken into account in my code.

This syntax was previously working; dipslaying a red text :

var s:string = "<TextFlow xmlns='http://ns.adobe.com/textLayout/2008'>";
s += "<format id='xtitle' color='#cc0000' fontFamily='Verdana' />";
s += "<p format='xtitle'>My red title </p></TextFlow>"

textFlow = TextConverter.importToFlow(s, TextConverter.TEXT_LAYOUT_FORMAT);

Could you tell me what has to be changed here ?

And more generally, where could i find documentation pertaining to the TEXT_LAYOUT_FORMAT, tags, attributes that can be used ?

Thanks in advance

This topic has been closed for replies.

1 reply

Adobe Employee
December 15, 2009

We ran into some problems getting the <format> element to work consistently with the other features, and decided to remove it for now, until we can get it right. I am sorry about this, but you will have to change your XML to put the formatting attributes directly on the elements, or use an IFormatResolver to do this.

Documentation for this could be better. Most of the Text Layout Format is also part of FXG, and is documented at http://opensource.adobe.com/wiki/display/flexsdk/FXG+2.0+Specification. Look for the <RichText> element. In place of <RichText>, the Text Layout Format has <TextFlow>, and <TextFlow> has <p> or <div> as its direct children, without a <content> element. We will work on improving the documentation, in the meantime, please feel free to ask questions on this forum.

- robin

Adobe Employee
December 15, 2009

The TLF blog also has docs on the markup:

http://blogs.adobe.com/tlf/2009/09/tlf-markup-overview.html

Richard

Participant
December 15, 2009

Robin & Richard,

thank you for replying so quickly, and for the links.

That's ok for me