492 posts
  • Has been part of the Envato Community for over 7 years
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 1+ items on Envato Market
+3 more
avenue28 says

Hi guys,

I’m trying to display Arabic text in flash. So far I’m partially successful with it. When I use normal system fonts like Arial, _sans without embedding text in the textfield, it works. But when I embed text, it doesn’t display correctly as it is supposed to display.

I’ve been searching on the internet for quite some time and couldn’t find very useful information. So I was wondering if anybody knew how to work this out and properly display arabic text in dynamic text fields in flash.

Thanks for any help offered. :)

4140 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 1+ members
  • Has sold $5,000+ on Envato Market
  • Located in Brazil
+3 more
tsafi says
Hi guys,

I’m trying to display Arabic text in flash. So far I’m partially successful with it. When I use normal system fonts like Arial, _sans without embedding text in the textfield, it works. But when I embed text, it doesn’t display correctly as it is supposed to display.

I’ve been searching on the internet for quite some time and couldn’t find very useful information. So I was wondering if anybody knew how to work this out and properly display arabic text in dynamic text fields in flash.

Thanks for any help offered. :)

It’s a pain when you working with text from right to left in particular when you mix it with text from left to right. No matter what you do i will recommend you always to embed your text when working with text from right to left.

But still it should not be a problem if from what i understand you embedding it directly on timeline using dynamic text this is the simplest way. Are you embedding in AS ?unless you are doing something else this should work . Note also if you wont embed your Arabic fonts computers with out the installation of complex script right-to-left will see your page blank were you submit your Arabic text.

492 posts
  • Has been part of the Envato Community for over 7 years
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 1+ items on Envato Market
+3 more
avenue28 says

hi tsafi – Thanks for the reply. This is what I’m doing right now. I have a dynamic textfield in Flash (no font embedded). I have an XML file that has some arabic text (see the XML file here) – which I want to load into flash. The XML file is saved in UTF -8 format. So I load the XML and set the text property of the textfield to this text and this is what I get – http://www.maheshj.com/arabic

If I embed the font (in timeline and not in AS) and load the string from XML , this is what I get – http://www.maheshj.com/arabic1 (not displaying correctly). The font I’m using right now is Arial and the arabic string translates to “My name is Mahesh”.

Just now I noticed that the first version (fonts not embedded) works on my laptop vista/IE and firefox but it doesn’t work on another computer with XP/firefox.

Right now I’m not concerned with having both left-to-right and right-to-left text. I just need a reliable way to display just arabic text.

100 posts
  • Has referred 10+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
DesignForLife says

not embed. Tahoma use. Test Please

492 posts
  • Has been part of the Envato Community for over 7 years
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 1+ items on Envato Market
+3 more
avenue28 says
not embed. Tahoma use. Test Please
Seems like it works. One question though. Are you using a mask to define the scroll area for the scrollbar? If yes, then how are you managing to display non-embedded text in mask? Generally if you put a mask on a textfield that doesn’t have fonts embedded, it doesn’t show up…am I right?
4140 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 1+ members
  • Has sold $5,000+ on Envato Market
  • Located in Brazil
+3 more
tsafi says

ceonflames .

You are using AS2 please confirm it (look like you’re using AS2 ) If so just to confirm save the actual XML as UTF -8 is the first step. I can’t read Arabic but i can understand the language in a variable matter.

From what i see on your embed XML file, your letters is showing your text in reverse. i see the latter “Hamza” at the last of the word so i know its reverse.

i notice this since it’s the same problem i was facing in others language like Hebrew and the rest of the special complex script right-to-left.

This was for many years a pain to deal with when working with flash.

The solution for this is to make actual code to reverse the letters; this was very poplar for a few years but the best solution is to make your Xml base Action script on HTML tags, loads an external CSS (CSS styles are applied to the html tags) this way you won’t have any problem with showing the embed text in the proper manner.

But you need to submit many HTML tags in your AS so you won’t face any problem with end tags because of the switch special complex script right-to-left. .

I am actually working on XML CSS class for supporting mix language left to right or right to left and support all Html tags on the same XML file with Action Script footpath but its in AS3 .

But if you interesting when it’s done, i can offer you the class (don’t worry for free).

On flashden i saw only 1 file that support Arabic with XML full embedding (its even mix i think) it’s the Redline template if I remember correctly.

Also on DesignForLife File need to ask him if its XML i don’t think so .

I hope this was helpful.

Tsafi

100 posts
  • Has referred 10+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
DesignForLife says
not embed. Tahoma use. Test Please
Seems like it works. One question though. Are you using a mask to define the scroll area for the scrollbar? If yes, then how are you managing to display non-embedded text in mask? Generally if you put a mask on a textfield that doesn’t have fonts embedded, it doesn’t show up…am I right?

not embed font and code mask friend example :

txt.setMask(txt_mask);

txt and txt_mask = Movie Clip
txt movie clip in not embed dynamic text field

Sorry my english is not very good! :)
Best Regards DFL

492 posts
  • Has been part of the Envato Community for over 7 years
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 1+ items on Envato Market
+3 more
avenue28 says

tsafi – I did save the XML in UTF -8 format. I opened a notepad, wrote the text and in the save dialog, selected UTF -8 as the encoding. I don’t even know Arabic. I just got it off a translation I did in google here

Right now I’m using AS2 . But I don’t have an issue developing in AS3 also. This is just an experimentation before starting the actual project. So if AS3 helps, I can go with that too.

Regarding using CSS to format the text to display RTL text, I found this after a bit of searching. Is this what you are talking about? I guess I’ll give it a shot and see it it works for me.

Sure, I’d love to see the class you are working on. If I may ask, will it be coming any time sooner? I saw the red line template. I’ll try contacting the author and see if he can help me out.

Thanks for all the help.

4140 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 1+ members
  • Has sold $5,000+ on Envato Market
  • Located in Brazil
+3 more
tsafi says
tsafi – I did save the XML in UTF -8 format. I opened a notepad, wrote the text and in the save dialog, selected UTF -8 as the encoding. I don’t even know Arabic. I just got it off a translation I did in google here

Right now I’m using AS2 . But I don’t have an issue developing in AS3 also. This is just an experimentation before starting the actual project. So if AS3 helps, I can go with that too.

Regarding using CSS to format the text to display RTL text, I found this after a bit of searching. Is this what you are talking about? I guess I’ll give it a shot and see it it works for me.

Sure, I’d love to see the class you are working on. If I may ask, will it be coming any time sooner? I saw the red line template. I’ll try contacting the author and see if he can help me out.

Thanks for all the help.

The example you gave is what i was talking about and you can work it around (I didn’t look at code).

Your example translation from Google is a good example how not to use it since it doesn’t know in most case how to put the right sentence on the right order if you have a mix in English Arabic Hebrew and the rest of the wired right to left gang.

Regarding the class this is sometime i am working on for some time i am covering all the tag bases +the possibility to load a picture and the text will be fix around the pic .

The thing is i run up with some difficulty since i want to add the function to combine also in 1 line text from left to right and from right to left so if you have a word in English it wont be a problem to add 1 word in the middle of the text that goes from right to left on the XML .

Also i am working on pure AS3 with no library assets i am already on 500 line of code and on the half way since i want to control it in full with Xml with out the need ever to modify the code ,you will be able to write it in all language`s no matter what direction the text go from on the actual XML .

The problem in some language you have some punctuation that screws the text in particular 1 weird language name “Hebrew”(a pure punishment if you ask me).

You need to be careful when working on flash XML text with out knowing the language some small things look logical to you will not be right to a native language speaker, your Arabic embed text like i say is reveres, Html tag will fix that, the example you show me can help you .

Feel free to contact me if you run in to difficulty (if my free time is good) even for AS2 no problem.

I have some more urgent flash project but hopefully when i will done with the class i will submitted to FD but since i promise you it for free i will keep my word on that . Take it easy. Tsafi

492 posts
  • Has been part of the Envato Community for over 7 years
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 1+ items on Envato Market
+3 more
avenue28 says

Sure..I’ll contact you if I need any help. Thanks.

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by