{"id":322,"date":"2010-05-29T04:19:49","date_gmt":"2010-05-29T02:19:49","guid":{"rendered":"http:\/\/ixdc.net\/blog\/?p=322"},"modified":"2018-05-08T22:26:34","modified_gmt":"2018-05-08T20:26:34","slug":"actionscript-2-0-arabic-parsing-v1-4","status":"publish","type":"post","link":"https:\/\/ixdc.net\/blog\/2010\/05\/29\/actionscript-2-0-arabic-parsing-v1-4\/","title":{"rendered":"ActionScript 2.0 Arabic Parsing v1.4"},"content":{"rendered":"<p><strong>Update:<\/strong> a newer version available <a href=\"https:\/\/ixdc.net\/arabic\" target=\"_self\"><span style=\"color: #EF6596;\">here<\/span><\/a><\/p>\n<p>Well, I discovered some annoying bugs, all fixed in this version ..<br \/>\nAs per my previous post <a href=\"https:\/\/ixdc.net\/blog\/2010\/05\/23\/actionscript-2-0-arabic-parsing-v1-3\/\" target=\"_self\"><span style=\"color: #EF6596;\">here<\/span><\/a>, I still recommend embedding fonts to avoid improper rendering.<\/p>\n<blockquote><p>\n  <i>ActionSctipt 2.0 version available <a href=\"https:\/\/ixdc.net\/blog\/wp-content\/uploads\/2010\/05\/arabic_as2_v1.4\/parsearabic_as2_v1.4.zip\" target=\"_self\"><span style=\"color: #EF6596;\">here<\/span><\/a><\/i><br \/>\n  <i>ActionSctipt 3.0 version available <a href=\"https:\/\/ixdc.net\/blog\/wp-content\/uploads\/2010\/05\/arabic_as3_v1.4\/parsearabic_as3_v1.4.zip\" target=\"_self\"><span style=\"color: #EF6596;\">here<\/span><\/a><\/i>\n<\/p><\/blockquote>\n<p><em>Requirements:<\/em><\/p>\n<ol>\n<li>Dynamic TextField<\/li>\n<li>HTML Enabled TextField<\/li>\n<li>Pre-Assigned TextFormat<\/li>\n<li>Arabic Font<\/li>\n<\/ol>\n<p><em>Recommended Properties:<\/em><\/p>\n<ol>\n<li>embedFonts: for proper rendering on Mac\/Linux.<\/li>\n<\/ol>\n<p><em>Properties:<\/em><\/p>\n<ol>\n<li>data: for referencing original input string, use the data property (utils.data) instead of (TextField.text) where &#8220;utils&#8221; is an instance of StringUtils class.<\/li>\n<li>wrapFactor: optional reduction value (Mac only) for wrapping correction when using bi-directional text, possible values: .98 or less.<\/li>\n<li>htmlLines: array of spliced text block HTML lines.<\/li>\n<li>numLines: integer value of total text block lines.<\/li>\n<\/ol>\n<p><em>Features Supported:<\/em><\/p>\n<ol>\n<li> 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).<\/li>\n<li>Arabic Ligatures.<\/li>\n<li>Word Wrapping.<\/li>\n<li>Bi-Directional text.<\/li>\n<li>HTML Text.<\/li>\n<li>Loading External text on run-time.<\/li>\n<li>Windows\/Mac\/Linux support.<\/li>\n<li>Arabic enabled input fields using actionscript method (createArabicInput) with the help of javascript (arabicinput.js) <i>beta<\/i><\/li>\n<\/ol>\n<p><em>Features Not Supported:<\/em><\/p>\n<ol>\n<li> 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&#8217;re many other ligatures cases in Arabic used for Quran writing).<\/li>\n<\/ol>\n<p><em>Change List:<\/em><\/p>\n<ol>\n<li>Proper rendering for HTML bullet list (include the bullet character &#8220;\u2022&#8221; in the Character Embedding menu).<\/li>\n<li>Optimized conditions for basic thorough loop.<\/li>\n<li>New properties for referencing text block lines (htmlLines, numLines).<\/li>\n<\/ol>\n<p><em>Fixed Bugs:<\/em><\/p>\n<ol>\n<li>Multi-level HTML tags, for example:\n<ul style=\"margin-left:-40px; margin-top:10px; padding:0;\">\n<pre lang=\"html\"><a href=\"#\"><font>text<\/font><\/a><\/pre>\n<\/ul>\n<\/li>\n<li>Line-break determination on Mac.<\/li>\n<\/ol>\n<p><em>Known Bugs:<\/em><\/p>\n<ol>\n<li>Improper wrapping for non-embedded fonts only on Mac when begin text line with non-Arabic characters or when using custom format HTML tags.<\/li>\n<\/ol>\n<p>Here is an example works with <a href=\"https:\/\/ixdc.net\/blog\/wp-content\/uploads\/2010\/05\/arabic_as2_v1.4\/arabic.xml\" target=\"_blank\"><span style=\"color: #EF6596;\">this<\/span><\/a> external XML file <i>(with run-time resizing vs. wrapping)<\/i>:<\/p>\n<p><object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" width=\"500\" height=\"300\" codebase=\"https:\/\/download.macromedia.com\/pub\/shockwave\/cabs\/flash\/swflash.cab#version=6,0,40,0\"><param name=\"scale\" value=\"noscale\" \/><param name=\"base\" value=\"https:\/\/ixdc.net\/blog\/wp-content\/uploads\/2010\/05\/arabic_as2_v1.4\/\" \/><param name=\"src\" value=\"https:\/\/ixdc.net\/blog\/wp-content\/uploads\/2010\/05\/arabic_as2_v1.4\/arabic.swf\" \/><embed type=\"application\/x-shockwave-flash\" width=\"500\" height=\"300\" src=\"https:\/\/ixdc.net\/blog\/wp-content\/uploads\/2010\/05\/arabic_as2_v1.4\/arabic.swf\" base=\"https:\/\/ixdc.net\/blog\/wp-content\/uploads\/2010\/05\/arabic_as2_v1.4\/\" scale=\"noscale\"><\/embed><\/object><br \/>\n<em>download the above example <a href=\"https:\/\/ixdc.net\/blog\/wp-content\/uploads\/2010\/05\/arabic_as2_v1.4\/arabic_as2_v1.4.zip\" target=\"_blank\"><span style=\"color: #EF6596;\">here<\/span><\/a><\/em><\/p>\n<p><i>Test files are available <a href=\"https:\/\/ixdc.net\/blog\/wp-content\/uploads\/2010\/05\/arabic_as2_v1.4\/asunit_as2_v1.4.zip\" target=\"_blank\"><span style=\"color: #EF6596;\">here<\/span><\/a> using <a href=\"https:\/\/asunit.org\/\" target=\"_blank\"><span style=\"color: #EF6596;\">ASUnit<\/span><\/a> Framework<\/i><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[38,42],"tags":[3,34,36,37,5],"class_list":["post-322","post","type-post","status-publish","format-standard","hentry","category-38","category-may","tag-actionscript","tag-arabic","tag-as2","tag-as3","tag-flash"],"_links":{"self":[{"href":"https:\/\/ixdc.net\/blog\/wp-json\/wp\/v2\/posts\/322","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ixdc.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ixdc.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ixdc.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ixdc.net\/blog\/wp-json\/wp\/v2\/comments?post=322"}],"version-history":[{"count":4,"href":"https:\/\/ixdc.net\/blog\/wp-json\/wp\/v2\/posts\/322\/revisions"}],"predecessor-version":[{"id":1245,"href":"https:\/\/ixdc.net\/blog\/wp-json\/wp\/v2\/posts\/322\/revisions\/1245"}],"wp:attachment":[{"href":"https:\/\/ixdc.net\/blog\/wp-json\/wp\/v2\/media?parent=322"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ixdc.net\/blog\/wp-json\/wp\/v2\/categories?post=322"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ixdc.net\/blog\/wp-json\/wp\/v2\/tags?post=322"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}