Question

We are building a mobile application using Flash Builder 4.5.1, our application contains a text input that must accept arabic characters and should be "Right To left" directed. on the emulator all is working fine, while on the device it is not. When you type the characters they appear fine, but as soon as the textinput looses focus, the characters are instantly reverted.

The code for the text input is simply <s:TextInput id="txtTest" direction="rtl"/>,

Does any know what might be the issue?

This is also appearing on Android devices, When I compile the application to android mode, the arabic text in the Text Input is appearing as white boxes!!! also the arabic text in labels is fine.I tried embedding fondts but the text input won't take the new fonts!

Thanks

Was it helpful?

Solution 3

Sorry for the late reply, a friend of mine was finally able to solve this issue by upgrading to 4.6 SDK, seems that it won't work on 4.5

OTHER TIPS

I noticed something similar to this while developing an application with Flash Builder 4.6. What I noticed is that when I focus on a text area the font in that text area will change and when I focus out the font will revert back. This only happens in iOS. It appears that some default device font is used when inputting text and then the app's font is applied after the text is inputted. The reason you are not seeing the font after the text is inputted and your app's font is then applied, is most likely because you did not embed the font into the app (this would also explain why it works in the emulator and not on the device). Embedding fonts in a flex mobile project is not very straight forward. You need to embed a font twice, once with embedAsCFF set to false and again with embedAsCFF set to true. Then depending on what type of text area you are using, you need to apply CSS with the proper font family to it. Here is an article which explains the process clearer http://blogs.adobe.com/jasonsj/2011/08/embedding-fonts-in-flex-mobile-projects.html. One last thing, if you embed the fonts and are still having trouble, try setting the textarea's embedFonts property to true (it does not mention this in the article, but it worked for me).

Do you have any databinding or states associated with the TextInput? When transitioning from one state to another the databinding can be disabled. When transitioning to a previous state the databinding is enabled again and the previous value may be put back into the TextInput. If you have an example code please post it.

Are you using any Tween libraries or effects on it?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top