Attaching movieclip class without library symbol

Even though it is late Friday/early Saturday, I’ve got to write this one down:

Through an internal implementation of ActionScript 2.0’s compiler (which compiles code into ActionScript 1.0), Peter Hall discovered this little trick.

Here’s a shortened (and more obscured) example:

class Actor extends MovieClip {
    static var id = (id="__Packages.Actor")+

    public function Actor() {

To test:

import Actor;
attachMovie(, "_mc", 1);

This keeps the number of static variables to a minimum (one). Of course, this trick works only if the compiler uses the “__Packages.” prefix to the class path internally, and may not work in future versions of Flash. Nevertheless, it’s a very cool trick.

Events News

Flash in the Can presentation

Once again, I’ll be speaking at Flash in the Can this year. The presentation title is Object-Oriented Programming in ActionScript 2.0 (OOP in AS2).

Here is a list of possible topics:

  • What’s new in AS2 for AS1 developers?
  • Brief comparison of AS2 to Java and C#
  • Designing an AS2 OO application
  • EventDispatcher and the event model
  • Design patterns examples in AS2
  • Pitfalls and tips in AS2

Other suggestions? Leave comments and I’ll give them some thought. Remember though, with 70+ speakers this year, each presentation is only 45 minutes long; so I’ll consider the most wished for topics that can fit within this limited time. Thanks!


PrimalScript 3.1 released

Here’s a worthwhile piece of software for ActionScript 2.0 developers. Sapien has just released PrimalScript 3.1, a powerful scripting IDE supporting over 30 scripting languages.

What is especially important in this release is the extensive support for ActionScript 2.0, JSFL, Flex, Flashcom ActionScript and ColdFusion CFML. Some of the new features include:

  • PrimalSense – code hinting, code completion, object member lists, parameter help, function list…
  • Class browser
  • Support for intrinsic classes
  • Integrated Flash and ActionScript help

Check out the press release, and download a 30-day trial.


What a release: Director MX 2004!

Macromedia announced Director MX 2004 today. This is the most significant release in Director’s history. Why am I excited about this? As a developer who used Director since version 3, it’s been an amazing tool for many projects in the last 13 years or so. The new features in this release brings Director back to the spotlight with features that will attract Flash developers.

Although Flash got all the attention in the last couple of years, Director is still an important tool for:

  • content-heavy projects such as CDs / DVDs / kiosks
  • true 3D games / product demos / interface / environments
  • interacting with the local operating system and devices
  • third-party author-time and runtime plug-ins (Xtras)
  • pixel-based access
  • performance

Here are some of the exciting new features in this release:

  • JavaScript 1.5 (SpiderMonkey engine) support
  • Cross-platform projector publishing
  • DVD video/event/content support
  • Sprite and channel naming
  • Improved XML parsing
  • Extensive media support
  • Flash MX 2004 components

By the way, I’m still deciding on what to do with these old Director boxes. There’s both Mac and Windows versions, and even one unopened Director 5! The later versions were electronically shipped so I don’t have boxes to fill up my space, but they also lacked printed manuals that I still find easier to read than on-screen text… well, at least they saved a few trees.

Looks like it’s time to allocate budget for the upgrade again!