Virus game

Go here to play the virus game.


Variables and constants

Actionscript 3 guide to constants and variables.

This article assumes you have a knowlege of Classes and instances.

public class Cow extends Mammal {
	protected static const NUM_LEGS:uint = 4;

Let's dissect this cow, specifically, the NUM_LEGS constant.

There are 6 parts to this declaration:

I'm going to explain them backwards in order to go from simplest to most complicated.


File attachments fixed

File attachments are fixed. I did an update to Drupal after their nag screens telling me my version was no longer secure, and there were some added or fixed permissions regarding downloading attachments that they didn't mention in their update logs. Well, the permissions are set correctly and now files should be downloadable again. Please post any other bugs with the site here. (And workaround if any)


Flex states retaining memory

This is an old post that explains how flex states work, how creating a state creates a Factory that holds a hard reference to the state, and a workaround for states if you want to be able to release the memory of a state.

Since this post, I've learned a few things, and before reading, I want to make a few corrections.


Flex verticalScrollPolicy bug

When you have content with width set to 100%, and verticalScrollbarPolicy set to auto, when you resize the window so the vertical scrollbar is needed, you would expect the content area to adjust to handle the newly added vertical scrollbar, but it doesn't. What happens instead is a horizontal scrollbar appears.

To reproduce this bug:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="" layout="absolute" xmlns:local="*">
	<mx:Canvas width="100%" height="700"/>


Flash E4X Tutorial

This is a beginner's guide to E4X.
Flash has some good documentation on using E4X at:,
but it's hard to digest all that if you're just getting started.

You can download the example attached below and follow along.

Loading xml

Before we begin parsing any xml, I'll explain briefly how to load the xml.


Copying typed objects

Attached below is a utility class with 3 static methods:

  • clone
  • compare
  • mergeObjects

Clone lets you copy Objects and Arrays. If you copy a different class, the public properties (and recursive public properties) will get transferred, but the private properties won't. Also, the cloned object can only be of type Object or Array.

Compare lets you compare recursively the public properties of two objects or arrays. Useful for multi-dimensional arrays.


RIATest review

This is an article about using RIATest, along with a video demonstrating creating and running a basic test.


Adobe sucks

I've been a flash developer ever since Macromedia bought Flash from FutureSplash. When Adobe took it over after Flash 8, CS3 and CS4 has brought some great things, and brought some colossal headaches.
Things they've done right:

  • Actionscript 3.0
  • Tight integration with design tools. (Creative Suite)
  • Flash player improvements

Things they've done wrong:

  • IDE is more bloated, and harder to work with
  • Motion editor


Removing label from ProgressBar

In case this saves anybody some time. Removing the label from a flex ProgressBar isn't exactly straightforward. This is what I had to do:

<mx:ProgressBar label="" labelPlacement="right" labelWidth="0" horizontalGap="0" />

Syndicate content