# OOP - new Class inside a Class

**URL:** <https://forum.kirupa.com/t/oop-new-class-inside-a-class/155199>\
**Category:** flash\
**Created:** [July 15, 2005, 12:16pm UTC](https://forum.kirupa.com/t/oop-new-class-inside-a-class/155199 "2005-07-15T12:16:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Balala](https://avatars.discourse-cdn.com/v4/letter/b/df705f/32.png) [@Balala](https://forum.kirupa.com/u/Balala)\
**Post date:** [July 15, 2005, 12:16pm UTC](https://forum.kirupa.com/t/oop-new-class-inside-a-class/155199/1 "2005-07-15T12:16:25Z")

</div>

Hello.

I trying to create a new class instance inside of a existing class. For example:

I got a class for the whole map, and a class for the tiles, like grass, water, wall, etc…

Creating the array of the whole map, each value was suppose to be a new class of the tiles, something like this:

```auto
map[new_name] = new tiles(array*[j]);

```

But this doesnt seems to work very well. I got this error:

```auto
**Error** D:\map.as: Line 42: There is no method with the name 'tiles'.
     				map[new_name] = new tiles(array*[j]);

Total ActionScript Errors: 1 Reported Errors: 1

```

Thanks in advance
