[mx04pro] Dynamic (multidimensional) Arrays

Ok, this lack of formal multidimensional arrays in Actionscript is getting to me.

I’m trying to create an array within a class so that it’s flexible enough to dynamically allocate enough space depending on how the instance of the class is specified. Ideally, I want this array’s elements to also be dynamically allocatable.

I’ve used the trick to “force” a multidimensional array in Actionscript by doing something like this before:

var row0:Array = new Array();
var row1:Array = new Array();
var matrix = [row0, row1];

…but this method isn’t practical for dynamically sized arrays. Any other “tricks” you guys might have up your sleeves?