# 2d arrays inside constructor function

**URL:** <https://forum.kirupa.com/t/2d-arrays-inside-constructor-function/237707>\
**Category:** flash\
**Created:** [September 2, 2007, 11:15pm UTC](https://forum.kirupa.com/t/2d-arrays-inside-constructor-function/237707 "2007-09-02T23:15:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aquilonian](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@Aquilonian](https://forum.kirupa.com/u/Aquilonian)\
**Post date:** [September 2, 2007, 11:15pm UTC](https://forum.kirupa.com/t/2d-arrays-inside-constructor-function/237707/1 "2007-09-02T23:15:11Z")

</div>

I have a problem that i think i can solve if i create a 2d array based on another two arrays  
Im trying something like that

```php

var my2dAr:Array = new Array();
var i = ar1.length;
var j = ar2.length;
while(i--){
my2dAr* = new Array();
while(j--){
my2dAr*[j] = false;
}
}

```

inside the constructor function of myclass but it seems that it makes the script too slow and unresponsible  
So is there any way to make this 2d array inside this constructor function?OR a way to fake it?  
Thanks
