# Two Dimensional Arrays

**URL:** <https://forum.kirupa.com/t/two-dimensional-arrays/115850>\
**Category:** Uncategorized\
**Created:** [July 12, 2004, 1:30pm UTC](https://forum.kirupa.com/t/two-dimensional-arrays/115850 "2004-07-12T13:30:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Relain](https://avatars.discourse-cdn.com/v4/letter/r/aca169/32.png) [@Relain](https://forum.kirupa.com/u/Relain)\
**Post date:** [July 12, 2004, 1:30pm UTC](https://forum.kirupa.com/t/two-dimensional-arrays/115850/1 "2004-07-12T13:30:28Z")

</div>

Well, first of all Hello Everyone.

I’ve been trying to use ActionScript to create an isometric pseudo3d terrain generator thing, using a dot movie clip.

I come from a C programming background and i thought it’d be pretty easy to just attach a load of movie clips to the stage and put them all (well references to them) into a 2d array so i could call back to them with ease for the moving and the jiggery pokery.

This is what i think sets up a 2d array called point\_set, pretty strange syntax a mon avis…

point\_set = new Array;  
point\_set = [[],[]];

Then i attach the movie clips using some nested for loops:

vertex = attachMovie(“mcPoint”, “n”+total, total);  
point\_set[j]\* = vertex;

Then when i try and actually reference them, in this fashion:

onEnterFrame = function()  
{  
for (j=0; j\<height; j++)  
{  
for (i=0; i\<width; i++)  
{  
node = point\_set[j]\*;  
// rest of the function…

but i only get a few of the points in the onEnterFrame. Viz:

[www.relain.co.uk/stuff/flash/landscape.fla](http://www.relain.co.uk/stuff/flash/landscape.fla)

and actually at:

[www.relain.co.uk/stuff/flash/landscape.swf](http://www.relain.co.uk/stuff/flash/landscape.swf)

[it is actually an isometric grid, well on a Pi/6 angle but its not set up yet]

Well thanks a lot for any help folks
