Category Archives: Programming

All things code.

Using Abstract Classes in the Flash CS3/4 Library

Here’s a little trick that can help you save lots of time that might otherwise be spent creating multiple specialized classes in your Flash project. This trick makes use of the Base Class field in a symbol’s actionscript properties. (For … Continue reading

Posted in Flash, Programming, Tips, Tricks, and Hacks | Tagged , , , , | 4 Comments

The quest for the elusive “N-gleton”

Sure, we’ve all heard of Singleton, the design pattern that limits the number of instances of a class to one. It’s a feel good pattern because it’s easy to use and make us feel smarter in front of our co-workers, … Continue reading

Posted in Lab, Programming, Tips, Tricks, and Hacks | 7 Comments

AS3 number to hex converter

I’ve been working on some code for converting colors lately and getting quite into bitwise operations. In one of the demos I was making, I needed a quick and easy way to see the results of a color calculation. Of … Continue reading

Posted in AS3, Lab, Programming | Tagged , , , , , , | 5 Comments

Q&A – is, as, and type conversion

A question from a reader gave me an excuse to write a huge rant about type conversions: I’m doing a little exercise in a book that makes a textfield in which each letter can only be entered once. Not very … Continue reading

Posted in Architecture, AS3, Programming, Tips, Tricks, and Hacks | Tagged , , , , , , , , | 4 Comments

AS2 EventDispatcher

I recently went back to some AS2 code and created a replica of the AS3 EventDispatcher in ActionScript 2.0. The code is based on Danny Patterson’s original EventBroadcaster code. I tried my best to match the syntax of the AS3 … Continue reading

Posted in Flash, Programming | Tagged , | 4 Comments