there's been a lot of discussion in the past about how Flash cannot handle RTL text entry. since i don't know how this should actually work, since i've never had to deal with RTL locales, i'm not sure i "get it".
in a past Flashcoders post (that i can't find now in the archives), i mentioned a way that it might be able to be done - but IIRC, i didn't receive any response. so, i'm in no way sure my idea was spot on, close to working, or just completely off-base.
after reading Mike's post at oddhammer.com, i remembered my idea, pulled up an old sample, cleaned up the code, and got a sample up on a server.
the basic concept is this:
- embed a reversed (horizontally) font of the characters you need - whether that's unicode in Arial, or a specific hebrew/arabic font
- create an input textfield inside a movieclip
- set the font of the textfield to the reversed font
- set all the autoSize, wordWrap, and multiline properties of the textfield as if it were a normal LTR textfield
- set the _xscale of the textfield's parent movieclip to -100 so it becomes reversed
- start typing
i'm truly curious to know if this works as it should or what else is missing (obviously, the font is wrong for hebrew/arabic - i just used a reversed Arial font i found on the net). perhaps knowing what is missing, something can be done about it. i would imagine that if this actually did work, turning it into a component shouldn't be too big a deal...
edit - i would imagine the keyboard navigation (right/left) would have to be modified as well?)
No Comments for this post yet...
Comments are closed for this post.
The opinions expressed on this blog are those of the author only and are not necessarily those of his employer.
