Skip to main content
Participating Frequently
Sep 14, 2009 8:47 AM UTC
Question

TextLayoutImporter replace TextConverter ?

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 is closed to new replies. Start a new post to keep the conversation going.

6 replies

Camussx
Inspiring
Sep 14, 2009 1:38 PM UTC

Hello llnn:

You can use TextFilter in replace to TextConverter.

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

Try it.

Translate
llnnAuthor
Participating Frequently
Sep 14, 2009 3:17 PM UTC

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

Translate
Inspiring
Sep 14, 2009 5:07 PM UTC

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

Richard

Translate
Known Participant
Sep 14, 2009 12:09 PM UTC

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

Translate
llnnAuthor
Participating Frequently
Sep 14, 2009 12:26 PM UTC

Thanks Fabien,

I will check this version from SVN....

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

Translate
Known Participant
Sep 14, 2009 1:26 PM UTC

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

Translate