Update: a newer version available here
Well, I discovered some annoying bugs, all fixed in this version ..
As per my previous post here, I still recommend embedding fonts to avoid improper rendering.
ActionSctipt 2.0 version available here
ActionSctipt 3.0 version available here
Requirements:
- Dynamic TextField
- HTML Enabled TextField
- Pre-Assigned TextFormat
- Arabic Font
Recommended Properties:
- embedFonts: for proper rendering on Mac/Linux.
Properties:
- data: for referencing original input string, use the data property (utils.data) instead of (TextField.text) where “utils” is an instance of StringUtils class.
- wrapFactor: optional reduction value (Mac only) for wrapping correction when using bi-directional text, possible values: .98 or less.
- htmlLines: array of spliced text block HTML lines.
- numLines: integer value of total text block lines.
Features Supported:
- Embedding Fonts (just put a dynamic textfield on-stage and select at least Basic Latin (95 glyphs) and Arabic (1088 glyphs) from the Character Embedding menu).
- Arabic Ligatures.
- Word Wrapping.
- Bi-Directional text.
- HTML Text.
- Loading External text on run-time.
- Windows/Mac/Linux support.
- Arabic enabled input fields using actionscript method (createArabicInput) with the help of javascript (arabicinput.js) beta
Features Not Supported:
- Arabic Diacritics (not necessarily for reading Arabic language in general, arabs are using diacritics mostly for writing Quran, and in that case diacritics are not the only missing feature, there’re many other ligatures cases in Arabic used for Quran writing).
Change List:
- Proper rendering for HTML bullet list (include the bullet character “•” in the Character Embedding menu).
- Optimized conditions for basic thorough loop.
- New properties for referencing text block lines (htmlLines, numLines).
Fixed Bugs:
- Multi-level HTML tags, for example:
<a href="#"><font>text</font></a>
- Line-break determination on Mac.
Known Bugs:
- Improper wrapping for non-embedded fonts only on Mac when begin text line with non-Arabic characters or when using custom format HTML tags.
Here is an example works with this external XML file (with run-time resizing vs. wrapping):
download the above example here
Test files are available here using ASUnit Framework

