How to Render Arabic Text Properly in Flash CS4 with Actionscript

I have been working on a project that requires to have Arabic text in a flash website. The issue is that every time we add Arabic text, some of the letters get flipped when we export the movie (.swf file). Here is a work around that my boss (Ben Johnston) discovered. It uses actionscript and html code. Here are the steps below:

1. Create a text file with all the Arabic text you want to put into the fla file. Use HTML markup to create paragraphs, texts aligns etc. At the beginning of each line, you will write this actionscript code: instance_name=”html text”;

For example:
about_me_text = “<p><b style=’font-size:200%;’>About Me</b><p><br />“;

about_me_text += “<p>Author: Me<br>Department of Me Studies<br>Myself University <br></p><br >”;
about_me_text += “<p>More text<br></p><br >”;

Note: When you add an extra line, make sure your actionscript code has a + in it.

2. Go to the layer you want to add the text. Add a text box.

3. Open up the actionscript window for that layer. Paste in your text (with the actionscript and html markup in step 1)

4. Click on the text box. In the text box properties choose Dynamic Text

5. In Dynamic Text, there is a an instance textbox. Type in the instance name in the actionscript code. For this example, that would be: about_me_text

6. Under Paragraph in the text properties, in Behavior choose Multiline.

7. Under Options in the Text Properties, type in the same instance name for the Variable text box. In this example it would be:  about_me_text. (You can copy and paste the text you enter in step 5).

8. Render your movie.

Note: You can change the color, font type, and size in the Text Properties menu too.

This entry was posted in Educational Technology and tagged , , , , . Bookmark the permalink.