An excellent tutorial on how to use the Text Layout Framwork with MXML tags was written by Elad Elrom on InsideRIA. This is great info for anyone looking to use TLF in Flex! Check it out here:
Recently in Examples Category
Mihai Corlan posted a useful example on his blog on how to add a scrollbar for a TextFlow.
See it here: How to add a scrollbar to Text Layout Framework.
TLF supports a new property on TextFlow called formatResolver of type IFormatResolver. Clients can supply an implementation that can be used to do CSS or "based-on" styling (ala traditional word processors).
NOTE: Updated to TLF Build 460. http://blogs.adobe.com/tlf/Pagination460.zip
The Pagination example in the TextLayoutFramework is posted to build with Adobe Flash CS4 Professional and the TextLayout plugin. Its also possible to build this example with Flex as an ActionScript only project. It does require the Flex 3.2 or Flex gumbo SDK.
I've posted the actionscript version that builds with Flexbuilder here: Download file
This version doesn't have the buttons the Flash Pro version has. Use page up/page down to switch between chapters and the arrow keys to move between pages.
Both the ActionScript version and the Flash Pro version use PaginationWidget.as to manage the paginated view. This is example code that you can use to build your own paginated view. The pagination widget adds new containers until all the text is in a container and then displays some number of containers emulating columns. It supports resizing the visible area. One of the goals was to avoid recomposing every time the visible area changed by a small amount. Hence the decision to relayout during resize has some heuristics.
Note that the labs release has bugs (since fixed) in displaying selections when some of the containers are not visible. This example doesn't make use of an interactionManager due to those bugs.
One of the powerful features of TLF is that anything you create can be imported/exported in XML. In this post I'm going to explain the tools we provided for working with Text Layout Markup in the Flash CS4 Component.
