THEACTIONSCRIPTER.COM
THEACTIONSCRIPTER.COM

AS 3 Focus Manager and Tabbing Issues

Tabbing can be one of the biggest challenges in Flash.  Ok, tabbing is the biggest problem with Flash, at least for me.  One common mistake I notice programmers make when using the FocusManager is that the focus gets lost when testing the code.  The reason is because the FocusManager doesn't work correctly when testing your code inside the Flash IDE.

It is best to test the FocusManager functionality outside the Flash IDE and inside an html page. 

The FocusManager which implements IFocusManager will effect your testing inside all versions of the Flash for both ActionScript 2 and ActionScript 3.

If anyone ever finds a good solution for controlling the tabbing in Flash please post a comment below.

Flash Error #1502 - Time execution error

Error #1502: A script has executed for longer than the default timeout period of 15 seconds.

Actionscript error #1502 usually happens when the code is stuck in a forever loop.  Check your conditionals and make sure they have an exit point.

Unfortunately I did not get error #1502 from a conditional statement.  I received it because I was trying to import a .dea file that was taking a while to render.  I was able to solve this issue by changing the "Script the limit" property in the fla's publish settings on the Flash tab.

You can access the publish settings by selecting Ctrl+Shift+F12.

Let me know.

Internationalization Flash/ActionScript Multilingual Website - Part 1

I’ve been seeing more and more multilingual Flash websites lately. Developing a multilingual website in Flash/ActionScript isn’t as easy as other web technologies. Flash introduces a number of challenges for internationalization. This article is to help with the planning of your site, so you can have a smooth development phase. This article is not just targeted to ActionScripters but also the people planning the project scope, copy writers and creative team. ActionScripters, do not be scared to send the other disciplines a link to this article. Sometimes they just need help seeing the light.

Flash doesn’t flow as smoothly as other web technologies when displaying content and copy. There is a lot of programming needed to make sure the alignment is correct for all cases.

Some general tips to make internationalization in Flash easier:

  • Use as little copy as possible
  • Understand that COPY WILL NOT ALWAYS BE THE SAME LENGTH IN ALL LANGUAGES
  • Use universal images and symbols instead of copy – for example use an image of an arrow for a go button instead of the word “go”. The word “go” may only be two characters in English but may be a lot more in other languages
  • It is easier to change copy than code (late in the game) – for example, when a user sees a combo box full of cities they know they are supposed to select a city. So in case there isn’t enough room for the whole phrase “Wählen Sie eine Stadt” (select a city in german) change the copy to “Stadt”.
Many of the above tips may seem like common sense but can easily get over looked when designing the creative and writing the copy, especially when copy has to pass legal.

Internationalization Issues/Tips ActionScripters Should Be Aware Of:

Put all copy in an xml file

It is important to put all the sites copy in an XML file and load it dynamically so you do not need to make multiple versions of the fla.

When naming each xml file keep it consistent with the language ids. 
  • English (United States) – en_US
  • English (United Kingdom) – en_UK
Make all buttons MovieClip instances and automatically adjust depending on the size of the text
 
In AS 2 we were allowed to easily read in the XML and assign the text to the text field using the text field’s var. They removed the var feature in AS 3 so you will have to assign the text field normally.

mcButton.txtCopy.text = “Hello World”;

Since AS 3 removed the var feature we need to make all the buttons, MovieClip instances. I like to create my own button class to handle setting the copy and the dynamic sizing.

Finding out the user's default language

  1. Have a different URL for each language - Easiest but laziest
  2. Have an IP sniffer to determine where the user is located. This is a very popular technique but not my favorite. My major issue with this is what if a user is on vacation in another country and visits the website with their laptop. They will be stuck with the wrong language even when they make the trip back home because the language id should be stored as a Flash shared object.
  3. Have a language select at the very begginging of the site. I prefer this method because it is the easiest for the user to understand and will be the most accurate. Display a list of all the languages in their native tounge or with images of flags next to it.

Make sure to embed all fonts and special characters

List of special characters

If you have to make a multilingual website and some languages are not latin based, then it may be better to use device fonts. This will affect creative but it is better than embedding each non-latin alphabet. If you embed each character set you will drastically increase your file size.
 
Be aware of images with copy

You may run across issues if your images have copy on them. For example, if you are making a website that has a catalog of movie titles and each movie title is different depending on the language. In this case, make sure you load the images dynamically.

External Links
 
From my experience from making many multilingual websites for product promotions they have external links to that products parent site relative to its native language. Be aware that each language may have different urls for these links. This is a small detail that gets over looked a lot when developing the flows. Have a list of the urls in an xml file and assign them as needed.

Be careful of legal copy issues

I have encountered many strange issues when doing internationalization for a website but one of the craziest issues was the special character TM. The thing is not all countries use TM for trademark. I learned the hard way that in France they use MC instead of TM. Not being aware of this minor detail made me have to scrabble to get the MC character embedded into my fonts (wasn’t easy) and had to change a number of static images to load dynamically.

I am sure their other examples similar to this that I have not came across yet. So be aware. Research it if you are not 100%. It will save you time in the long run.

Examples of Internationalized Flash Sites

 

Welcome

Welcome to my blog. Please check back soon for new entries.

Sponsored Links

Recent Posts

  1. HTML5 vs Flash
    Sunday, June 13, 2010
  2. Free Gucci Mane Flash Game
    Monday, January 18, 2010
  3. Flash Input Text Font Issue with Mask
    Tuesday, January 05, 2010
  4. Developing Flash on a Mac vs PC
    Tuesday, December 29, 2009
  5. AS 3 Hide/Show Mouse Cursor
    Tuesday, December 15, 2009
  6. Where Can I Find Omniture Flash ActionSource Documentation?
    Friday, November 06, 2009
  7. Flash Making Extra Omniture Tracking Calls
    Thursday, November 05, 2009
  8. Connecting to a Web Service in Flex
    Wednesday, November 04, 2009
  9. Reading a RSS/Twitter feed with ActionScript 3
    Tuesday, November 03, 2009
  10. AS3 :: Get all Children MovieClips
    Friday, October 09, 2009

My Bukisa Articles


Subscribe


Blog Software