# Creating tiles in as 2.0 effiently, How?

**URL:** <https://forum.kirupa.com/t/creating-tiles-in-as-2-0-effiently-how/197874>\
**Category:** programming\
**Created:** [August 20, 2006, 3:30am UTC](https://forum.kirupa.com/t/creating-tiles-in-as-2-0-effiently-how/197874 "2006-08-20T03:30:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Saenz](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@Saenz](https://forum.kirupa.com/u/Saenz)\
**Post date:** [August 20, 2006, 3:30am UTC](https://forum.kirupa.com/t/creating-tiles-in-as-2-0-effiently-how/197874/1 "2006-08-20T03:30:35Z")

</div>

First of All, I want to thanks Kirupa and all involved in this site to the great source of wisdom.

Well, I was reading the great tonypa tile games tutorial, and Im stuck in a simple problem, can someone help me?

The following code was written for flash 5, and does not work good in flash 8:

\*_for (var i = 0; i \< mapHeight; ++i){  
for (var j = 0; j \< mapWidth; ++j) {  
var name = “t\_”+i+"\_"+j;  
game[name]= new game[“Tile”+map_[j]];  
game.clip.attachMovie(“tile”, name, i_100+j_2);  
game.clip[name].\_x = (j\*game.tileW); \*\*

(and so on…)

the problem that I cannot understend is this var name, it does not work in flash 8. What class it must be?
