“Be inspired, enjoy your work, keep learning and never forget to play.” — gskinner

Actionscript Class Comments

Posted: December 20th, 2007 | Author: nuno | Filed under: Actionscript3, Best Practices | 2 Comments »

I've been gathering some guidelines to writing proper class documentation in Actionscript. This is so basic stuff but anyway it helps to have it written down somewhere. Here's what I have so far as general guidelines:

  • Use ASDoc block comments (Ctrl+Shift+D in Flex Builder).
  • Write in English.
  • Use a $Id$ svn/cvs keyword so everyone knows directly who did the last change on the file.
  • If importing to COM, write an example of usage.
  • Favor the use of getters and setters instead of public vars/const.
  • In the source code use the following order to keep things organized:


Another Way to Force the Garbage Collection

Posted: December 20th, 2007 | Author: nuno | Filed under: Actionscript3 | 1 Comment »

The flash.system.System class in Flex 3 SDK beta 3 has a new gc() static method that forces the garbage collection process (it works for Flash Player debugger version only). Previous to this method the only known way to force the garbage collection was the localConnection hack so this is good news.