IxD Consultant ActionScript, Flash, Flex, AIR and Python

Interaction Design (IxD) is poised to become one of the main liberal arts of the twenty-first century.
Malcolm McCullough
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)

As per my previous post here, I’ve followed the same approach, but this time using ActionScript 3.0 to produce my method for proper Arabic rendering in a dynamic TextField.

You can find this one here.

1 Star2 Stars3 Stars4 Stars5 Stars (6 votes, average: 4.33 out of 5)

As per my previous post here, I’ve made some improvements to my method for proper Arabic rendering in a dynamic TextField using ActionScript 2.0.

An ActionSctipt 3.0 version available here

Many thanks to all reviewers, your comments were very helpful bringing this version available, now you can use and test my new parseArabic method ..

Requirements:

  1. Dynamic TextField
  2. HTML Enabled TextField
  3. Pre-Defined TextFormat
  4. Arabic Fonts must include a complete Arabic Presentation Forms-B (glyphs from FE70 to FEFE according to the Unicode Standard 5.2)

Features Supported:

  1. 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).
  2. Arabic Ligatures.
  3. Word Wrapping.
  4. Bi-Directional text.
  5. HTML Text.
  6. Loading External text.

Features Not Supported:

  1. Arabic Diacritics.

Fixed Bugs:

  1. Correct Arabic Ligatures with/without embedding fonts
  2. Correct Brackets Directions
  3. Clean Line-Breaks

Here is an example works with this external XML file:


download the above example here

Note:
When you try to select and copy the above text into a static TextField it will display Arabic properly as well, just another benefit of this method, but if you paste the copied text into any other text editor you will see an alien version instead!

1 Star2 Stars3 Stars4 Stars5 Stars (6 votes, average: 4.33 out of 5)

Update: a newer version available here

Well, this issue is a very old one, I’ve always experienced annoying problems each time I try to render Arabic text on run-time using Flash and ActionScript 2.0, Flash doesn’t support right-to-left languages, and when it comes to Arabic, we are talking about proper characters joining and word wrapping ..

I never stopped tracking this specific issue, googling it to find any new solution has been developed somewhere, for a long time I can only find this one, the guy have it perfectly solved, he was having his solution implemented using ActionScript 2.0 at some point earlier, but he stopped publishing that and kept his latest version only, which works with ActionScript 3.0, and for old fashion guys like me he left another version to manually copy proper Arabic text using an AIR application he developed here

Recently, Adobe says that they finally supports right-to-left languages along with bi-directional and complex script ones, only using ActionScript 3.0 and it requires Flash Player 10 or above, they even have an open source framework called Text Layout Framework, it’s perfect actually, it should put an end to this issue, but ..

I have my own objections, I made my quick test to check their new technique here, Arabic text is finally rendered properly, but why we have to add so many childs to our display list from different TextLines and TextBlocks instead of a single TextField? also we have to set a max width, and I couldn’t find a way to scroll through text unless I used a custom scroller and masking the text just like any other MovieClip or DisplayObject, personally, I find this much complicated experience just to display simple string!

I do like ActionScript 2.0 a lot more anyway, not just for handling text easily, but for many other reasons, I can stop to post another article to explain why I’m saying this, right now we need to know what I’ve reached regarding to our issue ..

In a nutshell, ActionScript 2.0 used to refuse right-to-left languages, so we can’t embed fonts, wrap text properly, and when it comes to Arabic text we also see our characters splitted which is inappropriate for Arabic readers, the old solution for this was loading text encoded in UTF-8 from external text/xml files, and still no word wrapping, and on Mac machines Arabic letters still splitted, we can align text but its direction still not right-to-left ..

So, logically, I know that I have to construct my Arabic text manually, to achieve that I had to analyze Arabic rules for character joining with all it’s special cases, and then find a way to force its direction to be left-to-right, and the word wrapping part is not that hard after all, this is basically what I did actually!

My only problem was in finding a way to inject all proper Arabic characters with its unique cases, for a long time I found that very difficult, Flash doesn’t allow me to copy those from other text processing tools, and of course there’s no way to type each character a lone in different cases using keyboard ..

Finally, I found a way to do that, and it was extremely simple! I found these charts at unicode official website, and that’s it! now I can instruct ActionScript 2.0 to handle my Arabic characters properly!

You’re most welcome to use and test my parseArabic method, it supports word wrapping, right-to-left, bi-directional (inline English characters), embedded fonts and custom text formats, here is an example:


download the above example here

The above approach doesn’t support html tags yet, it’s a bit confusing, but as I said, you’re welcome to contribute, your reviews can help improving the code ..
This may help any ActionScript 2.0 loyal friend, and I think the same approach can be used for ActionScript 3.0 as well, I will post that soon ..

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)

Yesterday I’ve joined Flash Camp in Egypt ..

Flash Camp Egypt is the most prestegious Adobe User Groups event in Egypt for 2009. Organized by Imagine – Adobe User Group in Egypt, and hosted by the AUC in their magnificent Bassily Auditorium at the New Campus in New Cairo.

Sarmady was one of the gold sponsors for the event, along with many other sponsors like Adobe Inc., Msn Arabia, Datum, O’Reilly, iStock Photo, Total Training, …, and many more.

Event sessions was concerning Adobe Flash Platform technologies and it’s benefits for digital business in Egypt, focusing on Adobe Flash Player and Adobe AIR runtime, involving the major authoring environments like Adobe Flash Professional, Adobe Flex Builder and the new product Adobe Flash Catalyst.

Flash Platform created a breakthrough into the digital market, by migrating the end-user practices to a whole new level of rich-internet experiences, which delivers the most compelling applications, content, and video to the widest possible audience.

We’re not talking about animation features only, but also interactive content, data visualization, rich applications, media and gaming experience, all in one light-weight software platform used by 99% of internet users, the Flash Player.

Sarmady always in a hunt for new technologies, especially creative and interactive ones, we use Flash Platform interactive features for all our digital advertising campaigns, also we have developed special reporting services like Dwell Time, Leading Actions, and many more to come ..

Tags: ,
1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 3.00 out of 5)

There’s so much to tell about how media files can be manipulated in web applications, especially when we talk about large amount of video files compared to quality displayed ..

A web application will use certain file formats depending on which technology is used to render videos at front-end and/or back-end streaming server [if there's any]

Since Flash Platform is the best environment for such processes, it was difficult to prepare videos before using them on the web, developers had to have videos encoded from their original formats to FLV in order to use with Flash Player and Flash Media Server, then Adobe added the support for H.264/AAC since the release of Flash Player 9.0.0.115, that was wonderful feature but still we face the same old problem with encoding videos ..

According to my experience, the best practice to make this encoding process easier is to use FFMPEG in conjunction with PHP as a back-end server service, such procedure requires installing FFMPEG along with all its required libraries, after all a developer can use PHP to dynamically encode uploaded videos with FFMPEG and save the final FLV videos on server, plus other features like extracting image frames from videos ..
this article describes how to install FFMPEG on Centos 5

Yet this operation doesn’t give a perfect result regarding to quality and performance, but ..
It seems like there is a better solution is waiting to be unleashed ..

Adobe has announced the upcoming release of Flash Media Encoding Server on fall 2008 ..
you should read the features, quite amazing ..
Just think about the possibilities here ..

Tags: ,