Skip to main content
Known Participant
May 13, 2011
Question

Unable to type chinese language in TLF

  • May 13, 2011
  • 2 replies
  • 1839 views

Earlier  i created text editor project in flex sdk 3.5. It contained a editable  TextFlow() object (by adding the textlayout library manually). Here i was able  to type all languages like hebrew, arabic, urdu as well as chinese.
But now  i compiled my project with 4.1 sdk (it contains the in built text layout  framework), i am able to type all lanugages but not Chinese. Chinese does not  show on typing with keyboard, instead english is typed. But yes i am able to  copy paste the chinese. i have installed chinese in the windows OS. Not able to  type Chinese with the 4.1 SDK. Please help.

This topic has been closed for replies.

2 replies

Thaneros
Participant
September 22, 2011

Arnold, I have the same problem. Did you find a solution ?

Adobe Employee
May 13, 2011

Pls test your app with the latest Flex SDK. http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4.5

If it doesn't work either, pls paste your code scrap that can reproduce the case.

Known Participant
May 17, 2011

The exact scenario for this problem has been detected. Wherever i have used the TextArea(in 4.1 it has in-built textflow) component, the chinese works fine. But wherever i have used the textflow class object in editManager mode i cant type chinese(only paste it).
Example:
<s:TextArea id="txtAreaWriteMsg" width="100%" height="100%" enabled="{_allowWriteMessage}" borderVisible="false" focusThickness="0" minHeight="40"
      mouseDown="mouseDownTxtAreaWriteMsgHandler(event)"  maxChars="{_maxCharWriteMessage}" keyDown="keyDownTxtAreaWriteMsg(event)"
      keyUp="keyUpTxtAreaWriteMsg(event)" tabEnabled="true" tabIndex="0" /> It works fine.
But:
var mainSprite:SpriteVisualElement = new SpriteVisualElement();
    mainSprite.name = "mainSprite";
    mainSprite.x = 10;
    borderAreaMsg.addElement(mainSprite);

    txtFlow:TextFlow = new TextFlow();
    txtFlow = TextConverter.importToFlow(bindedData.Message, TextConverter.TEXT_LAYOUT_FORMAT);
    txtFlow.paddingLeft = 10;
    txtFlow.paddingRight = 20;
    txtFlow.paddingTop = 5;
    txtFlow.paddingBottom = 5;
    txtFlow.flowComposer.addController(new ContainerController(mainSprite,this.owner.width - 20,400));
    if(writingDirection == "rtl")
    {
     txtFlow.direction = Direction.RTL;
     borderAreaMsg.layoutDirection = LayoutDirection.LTR;
    }
    txtFlow.interactionManager = new EditManager();

    txtFlow.flowComposer.updateAllControllers();
In this editable textFlow object i am not able to type chinese

Adobe Employee
May 17, 2011

It seems an IME issue.For such issue, there are different situations with different input methods and operation systems. Because when you type words through input methods, TLF, Player and Systems all need to process the events. So there may be problems with few specific IMs. I guess if you use another Chinese IM, It may work well.

What's more, I recommend you use the latest SDK as what I said in my last reply, because there are new version TLF in new Flex SDK. For example, in SDK 4.5.0.20967, it's TLF 2.0.232. For details, pls have a look at my last few replies in http://forums.adobe.com/thread/848143?tstart=0