Skip to main content
Quentin T
Participating Frequently
April 2, 2010
Answered

Arabic text surrounded by numbers in TLF

  • April 2, 2010
  • 1 reply
  • 1050 views

Hey everyone,

I'm having an issue with arabic (RTL) and numbers (or punctuation)...

I need to display some numbers on the left and on the right of some arabic text, like so:

Problem is, it's hard to write that in the Flash IDE because numbers "jump" to the wrong side of the word... And when compiled in a SWF file and displayed it looks like that:

Which is bad!

Here's the simple script I wrote, as an image because this forum's RTE breaks it...

Bug, right?

Or you have a fix?

I'd love to hear so!

This topic has been closed for replies.
Correct answer Eric_Y_Muller

I suspect that you intend the text to be read as an Arabic reader would normally do, from the right, so you need to set the paragraph direction to RTL. I am not entirely sure about the exact way to do that, but I think that adding:

format.direction = Direction.RTL;

factory.paragraphFormat = format;

will do.

Eric.

1 reply

Eric_Y_MullerCorrect answer
Participating Frequently
April 2, 2010

I suspect that you intend the text to be read as an Arabic reader would normally do, from the right, so you need to set the paragraph direction to RTL. I am not entirely sure about the exact way to do that, but I think that adding:

format.direction = Direction.RTL;

factory.paragraphFormat = format;

will do.

Eric.

Quentin T
Quentin TAuthor
Participating Frequently
April 2, 2010

Wow, genius!

Thanks very much.