Skip to main content
Participating Frequently
September 14, 2009
Question

TextLayoutImporter replace TextConverter ?

  • September 14, 2009
  • 2 replies
  • 1222 views

Hello,


I downloaded the Flex 4 SDK and TLF on it.


Before this TLF version, I was using the Flash C4 TLF component: TLF has method TextConverter.importToFlow(someXML, ...); to import XML and to generate textFlow.


Now in the TLF of Flex 4 SDK the TextConverter class doesn't exist, but there is a new class named TextLayoutImporter with the same method named importToFlow(), but with different parametres in input.


Some one has used this class? Could help me?


Thank you...

This topic has been closed for replies.

2 replies

Camussx
Inspiring
September 14, 2009

Hello llnn:

You can use TextFilter in replace to TextConverter.

TextFilter.importToFlow(someXML, ...); //--> to import XML and to generate textFlow.

Try it.

llnnAuthor
Participating Frequently
September 14, 2009

Thanks Guys! I will use your code....

Adobe Employee
September 14, 2009

Make sure to check the releasenotes that are posted with each build.

Richard

Known Participant
September 14, 2009

Hi,

I have not looked in the downloadable version of the SDK, but in the SVN opensource, the TextConverter class exists (http://opensource.adobe.com/svn/opensource/flex/sdk/trunk/frameworks/projects/textLayout/textLayout_conversion / src / flashx / textLayout / / conversion). The TextLayoutImporteur class is marked [ExcludClass].

To try and to get the latest functionalities, my council is to take the latest SDK version on SVN (http://opensource.adobe.com/svn/opensource/flex/sdk/trunk/).

fabien

llnnAuthor
Participating Frequently
September 14, 2009

Thanks Fabien,

I will check this version from SVN....

Someone other has an exemple of use of TextLayoutImporter and importToFlow() function?

Known Participant
September 14, 2009

In the latest version of TextLayout, TextLayoutImporter needs 2 things:

- a source of course (String or XML),

- and an optionnal configuration (flashx.textLayout.elements.IConfiguration)

importToFlow() method return a TextFlow object.

You can use TextLayoutImporter like this:

var config : IConfiguration = new Configuration();
// your configuration here...

var textImporter: ITextImporter = new TextLayoutImporter ( config );
_myTextFlow = textImporter.importToFlow ( _mySource );

fabien