Sunday, July 26, 2009

Flash Text got better

TLF is a Text Layout Framework to handle some complex text, selection, editing. It can be used with Flash Professional or Flex. It is framework agnostic as the entire API is in as3 so it can be used with either flex framework or framework which is available in Flash Professional. TLF is a wrapper on top of FTE(Flash Text Engine), which is new in Flash Player 10. TLF renamed many times, it was previously known as Text Layout Foundation/vellum and now Text Layout Framework.

When to use FTE ?

Flash Text Engine deals with Line and Paragraph Layout and TextLine rendering. When you need only static text then its best to make use of FTE.

When to use TLF ?

When you want to deal with Paragraph Layout, Selection, Editing then make use of TLF. TLF has a markup for text, which can be parsed using E4X. Its basically XML.

Where to find TLF Source?

You will have to checkout from SVN, instructions and other details are available at the below location:

http://opensource.adobe.com/wiki/display/tlf/Text+Layout+Framework

How to get started, which classes I should use etc ?

Below are links to some post I found useful to understand TLF:

http://corlan.org/2009/01/19/how-to-use-text-layout-framework-in-flex-32-or-air-15/

http://corlan.org/2009/02/12/how-to-add-a-scrollbar-to-text-layout-framework/

http://www.insideria.com/2009/06/utilizing-flash-text-layout-fr.html

and I found a nice presentation from one of TLF engineer, Robin Briggs. You can watch it here:

Text Component Library for Flash Player 10

Demo:

http://labs.adobe.com/technologies/textlayout/demos/

Thanks for stopping by, I will be writing few articles on TLF, keep checking or follow on twitter to get updates.

Cheers,

Chetan Sachdev