07.12.2010
Now you can integrate my parser into your library as open-source under GNU GPL license ..
ActionSctipt 2.0 version available here
ActionSctipt 3.0 version available here
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).
You can use the old example found here, just replace the StringUtils.as class file ..

salman
Dear IDX,
First of all i would like to thank for this generous utility for arabic support,
So far, i have used your utility for all flash player 8 and its work well, now i got stuck as i have one project done with support of flash player 6 when i tried this utility with flash 6 i got an error on line 138 infact you have define there to use static depth() but i am not much familiar with AS much, kindly help what i have to change to make this useful with flash6 thanks a lot in advance
Asim Ahmed
am using textArea component for arabic text and getting error? is it possible to fix it?
import com.xvisage.utils.StringUtils;
var utils:StringUtils;
var format:TextFormat;
utils = new StringUtils();
utils.wrapFactor = .98;
format = new TextFormat();
format.color = 0×333333;
format.font = “Arial”;
format.size = 14;
format.align = “right”;
output.textField.mouseEnabled = false;
output.editable = false;
output.setStyle(“upSkin”,Sprite);
var xmlData:XML = new XML();
xmlData.ignoreWhitespace = true;
var xmlLoader:URLLoader = new URLLoader();
xmlLoader.addEventListener(Event.COMPLETE, showXML);
var xmlPath:String = “arb.xml”;
xmlLoader.load(new URLRequest(xmlPath));
function showXML(e:Event):void {
xmlData = new XML(e.target.data);
output.htmlText = utils.parseArabic(xmlData.text(), output, format);
output.setStyle(“textFormat”, format);
}
xVisage
@salman
Unfortunately my AS2 script requires Flash Player 8 or higher.
xVisage
@Asim
Try this:
How do I increase the number of words per line? is the wrapFactor?
xVisage
@Hassan
The wrapFactor used to limit the amount of words per line for specific fonts combination, it’s an optional value with a default of 1.0 which is the max. value as well ..
In other words, you can use values less than 1.0 only, that factor will not increase the amount of words per line, it will reduce them instead ..
Looks like you’re having a new issue here, try to comment the lines responsible for line breaks:
And use the following code snippet instead:
AS2:
AS3:
Hey there,
First of all, thanks for a brilliant piece of work! I have found it incredibly useful.
In my project I need to implement text input fields, I am aware that you have this functionality but cannot seem to find a working example on this site. The fla from the v3 link won’t open in my version of flash.
Could post a link to the files I need?
Many thanks
G
xVisage
@Gaz
Here is an Arabic Input example, you need to test this on HTTP server (like wampserver), FLA saved for CS3 ..
You’re most welcome ..