# \[mx04pro\] Dynamic (multidimensional) Arrays

**URL:** <https://forum.kirupa.com/t/mx04pro-dynamic-multidimensional-arrays/115231>\
**Category:** Uncategorized\
**Created:** [July 6, 2004, 7:59pm UTC](https://forum.kirupa.com/t/mx04pro-dynamic-multidimensional-arrays/115231 "2004-07-06T19:59:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kbuff](https://avatars.discourse-cdn.com/v4/letter/k/9fc29f/32.png) [@kbuff](https://forum.kirupa.com/u/kbuff)\
**Post date:** [July 6, 2004, 7:59pm UTC](https://forum.kirupa.com/t/mx04pro-dynamic-multidimensional-arrays/115231/1 "2004-07-06T19:59:59Z")

</div>

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?
