Archive for the ‘AS2’ Category

Alternate “Trace” Command in AS2 & AS3

AS2, AS3 | Posted by David Jumeau
Jul 21 2009

I had taken some video tutorials at Flash Extensions.com way back, and I always liked Robert Taylor’s appoach in using the trace command in Actionscript. I would represent this via the “tr” method in each of my classes so that when I am previewing the program, I can know in which class I can find the origin of my trace statements. AS3 is not much different since you can use multiple arguments in your function parameters.

The AS2 version used an undocumented arguments array in the parameters of a function like this:

// This method in a class called MyClass

private function tr(arguments):Void {

  if (arguments.length == 0) {
    trace("");
  } else {
    trace("[MyClass] ... " + arguments.join(" : "));
  }

}

In AS3,

// This method in a class called MyClass

private function tr(... args:Array):void {

  if (args.length == 0) {
    trace("");
  } else {
    trace("[MyClass] ... " + args.join(" : "));
  }

}

CasaFramework is now CasaLib

AS2, AS3 | Posted by David Jumeau
Dec 04 2008

Last year, I used the CasaFramework in my localization projects and pretty much saved me from further angst in Font usage in AS2 Flash development.

Recently, Aaron Clinger and Michael Creighton have released an AS3 version of the library. Also a new AS2 version has been released as well. (v. 1.5) I am sure there are many frameworks and libraries out there. I just mention this because they have a very good community base. I don’t know what I would do with out it in my AS2 development.

You can find the library at: http://casalib.org.

DJ

Internationalization (Localization) of Flash Applications with Flash 8 (AS 2)

AS2, Flash Platform, Flash Tutorial Sites | Posted by djumeau
Dec 12 2007

I haven’t posted in a while because I am full time in development of localized Flash applications in 11 languages with Flash 8 / AS2. The objective was that I include embedded fonts with externalized xml and css content. (Embedded fonts are required since I cannot modify properties with device fonts such as rotation and scaling.) Then I created tags in my xml file to correspond to labels in my animations. This was a tricky job, but I got it worked out.

The hardest aspect of localization development was to embed fonts into flash. There are many sites that addresses localization in flash development. (I realized that such development is getting to be an art form.) The Adobe site unfortunately doesn’t really help that much in this respect.

The free Fontastic engine at http://www.flashextensions.com is a good site. He also gives a quick overview of the intricacies of localization with Flash since Flash Player 7. There are video tutorials, but it has been very difficult to get in touch with the web administrator. I even tried to use three different emails to renew my video subscription but to no avail. Anyways, I had to move on and continue development.

Fontastic inspired me to use font symbols in external libraries. Later, I found that in my development that I was restricted to use only 255 characters. This is great for latin based characters (e.g. English, German, Italian, Spanish, Portuguese…) Maybe with exception to French. I needed to include the “oe” character, by creating a new font. (I use fontCreator by High Logic. )

Since I had to develop for Japanese, Chinese, and Greek, I was forced to include Unicode. So I thought about scouring the web one last time. But lo and behold, there was the casaframework.org. What the Zend framework is for PHP, the Casa framework is for Flash AS2. (An AS3 is in the works as we speak.) I began using the FontManager class and removed all references to my font library symbols. I had successfully ported over to Japanese and am working on Greek and Chinese.

Notable Links:

Flash and CSS:

http://www.blog.lessrain.com/?p=98

http://www.connectedpixel.com/blog/fonts/cssembedding

Flash Shared Font Libraries:

http://www.quasimondo.com/archives/000227.php

http://www.quasimondo.com/archives/000211.php
Flash and Unicode:

http://polygeek.com/110_adobeflash/actionscript_unicode-in-flash

Flash and Device Fonts: (A hack)

http://polygeek.com

Dynamic Fonts with Flash:

http://kelvinluck.com/article/dynamic-shared-fonts-in-flash

FAMES: Just a note

AS2, Flash Platform | Posted by djumeau
May 28 2007

You can find the installation instructions from the Brighton, UK Flash user group at: http://www.flashbrighton.org/wordpress/?p=16

DJ

Cool Flash / Flex / AS2 / AS3 / Video tutorials

Adobe Products, AS2, AS3, Flash Builder (formerly Flex Builder), Flash Tutorial Sites | Posted by djumeau
May 09 2007


In my previous blog, I was looking for the means of finding the most adequate way of loading fonts through run time libraries in the most efficient manner. It was practically impossible to figure out how to preload runtime libraries via flash. Although, I had an idea of loading other swfs that point to runtime libraries that seem to work out so that I can launch an event handler on the second frame to say that the font loading process was complete, lo and behold that there was another developer who already got into it and points to a far better implementation of this ever-elusive topic for using runtime font libraries for localization. Enter http://www.flashextensions.com by Robert Taylor. (I am not sure if there are other presenters.) He gave a presentation at last years Flash forward conference regarding localization. Check out the pdf doc he prepared. (Click here.)

And while I was going through the tutorials, I thought that this was just what I needed about advanced Actionscripting. I really recommend this site for advanced Actionscript development. Getting the videos and source code is minimal for about $25 for a month, which is plenty of time if you are dedicated to go through them. It will save a lot of headaches banging your head against the keyboard!

-DJ