Skip to main content
November 13, 2009
Question

TLF word adornment

  • November 13, 2009
  • 1 reply
  • 602 views

Hi all,

I have seen an example of spell check adornment(http://www.matthewfabb.com/examples/tlf/spell_check_adornment.html). As tlf is not providing in-built functionality of spell check. So I also have implemented the  same but I am facing some problems that I would like to ask. With the positive hope I would like to ask you my problems. The problems are as follows:
1. Getting red underline:
I tried to get the misspelt word with red underline but I didn't get how to do so? I have underlined the word using textDecoration property of span & color. But I am getting the world also in red. Can you please suggest me idea how to do?
2. TLF performance
Using Mihai Corlon example(http://corlan.org/2009/01/19/how-to-use-text-layout-framework-in-flex-32-or-air-15/). What I am doing is: on every space(keydown event) export flow xml(var xmlOut:XML = TextFilter.export(_textFlow,TextFilter.TEXT_LAYOUT_FORMAT,ConversionType.XML_TYPE) as XML;) then split each word in spans, on the basis of word correct or incorrect additional properties are added for misspelt(textDecoration='underline' & color='0xff0000'). Now this processed XML is  imported to textflow(_textFlow = TextFilter.importToFlow(textInput, TextFilter.TEXT_LAYOUT_FORMAT);) with new container(Sprite) removing the old one.
I think there is something where I am doing wrong(importing the flow again, add/ remove container). All this make results in performance issues.
I would like to know that how its done on every character.

For the above all the problems existing with the TLF we are going to loose this platform & the project.

Help me in finding the alternatives.

Thanks in advance

This topic has been closed for replies.

1 reply

November 24, 2009

Hi all,

I got the code for the spell check adornment. I have attached it. It sovles my problem 1 of getting red underline. But I am still having the problem 2 of performance.

What I understood from the code is:

The adornment is done on CompositionCompletionEvent.COMPOSITION_COMPLETE event.

I think may be this is resulting in low performance.

Suggest me the alternative to improve the performance.

Thanks in advance

.