{"id":288,"date":"2010-03-26T17:05:21","date_gmt":"2010-03-26T15:05:21","guid":{"rendered":"http:\/\/ixdc.net\/blog\/?p=288"},"modified":"2018-05-08T22:27:08","modified_gmt":"2018-05-08T20:27:08","slug":"actionscript-2-0-arabic-parsing-v1-2","status":"publish","type":"post","link":"https:\/\/ixdc.net\/blog\/2010\/03\/26\/actionscript-2-0-arabic-parsing-v1-2\/","title":{"rendered":"ActionScript 2.0 Arabic Parsing v1.2"},"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>As per my previous post <a href=\"https:\/\/ixdc.net\/blog\/2010\/01\/26\/actionscript-2-0-arabic-parsing-v1-1\/\" target=\"_self\"><span style=\"color: #EF6596;\">here<\/span><\/a>, I have another improved version, my deepest thanks to <a href=\"https:\/\/blog.janjonas.net\/2010-03-25\/actionscript-2-dynamic-textfield-arabic-text\" target=\"_blank\"><span style=\"color: #EF6596;\">Jan Jonas<\/span><\/a> who did contribute on this one, you can use and test my new <a href=\"https:\/\/ixdc.net\/blog\/wp-content\/uploads\/2010\/03\/arabic_as2_v1.2\/parsearabic_v1.2.zip\" target=\"_blank\"><span style=\"color: #EF6596;\">parseArabic<\/span><\/a> method ..<\/p>\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>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>Properties:<\/em><\/p>\n<ol>\n<li>For matching\/comparing input string, when referencing original input string use the data property (TextField.data) instead of (TextField.text)<\/li>\n<\/ol>\n<p><em>Features Not Supported:<\/em><\/p>\n<ol>\n<li> Arabic Diacritics.<\/li>\n<\/ol>\n<p><em>Fixed Bugs:<\/em><\/p>\n<ol>\n<li>Single Characters.<\/li>\n<li>Single-line TextField with autoSize.<\/li>\n<li>Upper-Case non-arabic characters.<\/li>\n<li>Extra Spacing at the end of each line (fixed by &#8220;Jan Jonas&#8221;).<\/li>\n<li>Double line-breaks (fixed by &#8220;Jan Jonas&#8221;).<\/li>\n<li>Empty String input. <\/li>\n<li>All Arabic Fonts are supported (requires embedding)<\/li>\n<li>Improved string processing performance<\/li>\n<\/ol>\n<p>Here is an example works with <a href=\"https:\/\/ixdc.net\/blog\/wp-content\/uploads\/2010\/03\/arabic_as2_v1.2\/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\/03\/arabic_as2_v1.2\/\" \/><param name=\"src\" value=\"https:\/\/ixdc.net\/blog\/wp-content\/uploads\/2010\/03\/arabic_as2_v1.2\/arabic.swf\" \/><embed type=\"application\/x-shockwave-flash\" width=\"500\" height=\"300\" src=\"https:\/\/ixdc.net\/blog\/wp-content\/uploads\/2010\/03\/arabic_as2_v1.2\/arabic.swf\" base=\"https:\/\/ixdc.net\/blog\/wp-content\/uploads\/2010\/03\/arabic_as2_v1.2\/\" scale=\"noscale\"><\/embed><\/object><br \/>\n<em>download the above example <a href=\"https:\/\/ixdc.net\/blog\/wp-content\/uploads\/2010\/03\/arabic_as2_v1.2\/arabic_as2_v1.2.zip\" target=\"_blank\"><span style=\"color: #EF6596;\">here<\/span><\/a><\/em><\/p>\n<p>And <a href=\"https:\/\/ixdc.net\/blog\/wp-content\/uploads\/2010\/03\/arabic_as2_v1.2\/arabic_input\/\" target=\"_blank\"><span style=\"color: #EF6596;\">here<\/span><\/a> is another example for using a work-around approach for solving Arabic Input on Mac\/Linux, the approach uses <a href=\"https:\/\/ixdc.net\/blog\/wp-content\/uploads\/2010\/03\/arabic_as2_v1.2\/arabic_input\/scripts\/arabicinput.js\" target=\"_blank\"><span style=\"color: #EF6596;\">this<\/span><\/a> JavaScript file in conjunction with ActionScript to create transparent HTML controls and place them exactly over our input TextFields inside flash, the method works fine on Firefox, but it needs a lot more modifications for cress-browser compatibility, your contributions are most welcome for sure ..<\/p>\n<p><em>download arabic input example <a href=\"https:\/\/ixdc.net\/blog\/wp-content\/uploads\/2010\/03\/arabic_as2_v1.2\/arabic_input_as2_v1.2.zip\" target=\"_blank\"><span style=\"color: #EF6596;\">here<\/span><\/a><\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Update: a newer version available here As per my previous post here, I have another improved version, my deepest thanks to Jan Jonas who did contribute on this one, you can use and test my new parseArabic method .. Requirements: Dynamic TextField HTML Enabled TextField Pre-Assigned TextFormat Arabic Font Features Supported: Embedding Fonts (just put [&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,41],"tags":[3,34,36,5],"class_list":["post-288","post","type-post","status-publish","format-standard","hentry","category-38","category-mar","tag-actionscript","tag-arabic","tag-as2","tag-flash"],"_links":{"self":[{"href":"https:\/\/ixdc.net\/blog\/wp-json\/wp\/v2\/posts\/288","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=288"}],"version-history":[{"count":1,"href":"https:\/\/ixdc.net\/blog\/wp-json\/wp\/v2\/posts\/288\/revisions"}],"predecessor-version":[{"id":1247,"href":"https:\/\/ixdc.net\/blog\/wp-json\/wp\/v2\/posts\/288\/revisions\/1247"}],"wp:attachment":[{"href":"https:\/\/ixdc.net\/blog\/wp-json\/wp\/v2\/media?parent=288"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ixdc.net\/blog\/wp-json\/wp\/v2\/categories?post=288"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ixdc.net\/blog\/wp-json\/wp\/v2\/tags?post=288"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}