Embed system fonts with Flex SDK

Posted on 6th March 2010 in ActionScript | No Comments »

This little ActionScript 3 snippet will convert the system font to a SWF font instance that you can use in your AS3 project. Read the rest of this entry »

Enable Quick Look of ActionScript and Flex files on Snow Leopard

Posted on 4th February 2010 in ActionScript | No Comments »

Having Adobe CS4 and Mac OS X Snow Leopard both installed is very likely to mess up Quick Look of Flash ActionScript (.as) and Flex (.mxml) files. Most inconvenient for those used to browsing through the files and looking into them by just hitting the Space key. Read the rest of this entry »

ActionScript 3 Array constructor vs Array literals benchmark

Posted on 16th November 2009 in ActionScript | No Comments »

By the latest Coding Convention of ActionScript 3, the usage of the Array constructor is only encouraged for size allocation, e.g. var myArr:Array = new Array(2); for an array with 2 elements in it. In all other cases literals should be used, e.g. var myArr:Array = [];

Read the rest of this entry »

Date formatting prototypes for ActionScript 2

Posted on 3rd January 2008 in ActionScript | 1 Comment »

Here are 2 prototypes that you can use to convert a regular ISO-formatted date into a Flash Date object and then, if necessary, to a regular European date format. Both for ActionScript 2. Read the rest of this entry »

Importance of proper exception handling

Posted on 14th December 2007 in ActionScript | No Comments »

Too many developers cut on error handling by providing a very raw framework that is incapable of handling exceptions. It looks like it’s saving a day but in a long run it’s probably going to cost badly.
Read the rest of this entry »

String.tease method

Posted on 13th December 2007 in ActionScript | No Comments »

Ever thought of creating a teaser text of some longer string in Flash? For programmers still coding in ActionScript 2, here’s the piece of code to do it. Read the rest of this entry »

FileReference.postData property for file uploads

Posted on 6th December 2007 in ActionScript | 2 Comments »

On Flash file uploads, instead of populating your session ID in URL, you might use a specific property of the FileReference class. Read the rest of this entry »

String.replace() method for ActionScript2

Posted on 23rd November 2007 in ActionScript | 6 Comments »

Another snippet for free — String.replace() prototype for Flash that can be used to replace a pattern in a String. Read the rest of this entry »

Array.inArray() method in ActionScript2

Posted on 24th October 2007 in ActionScript | 2 Comments »

For those of you who are still developing in Flash ActionScript2, an Array method similar to the PHP’s in_array() might come in handy.
Read the rest of this entry »