# Migrating Tile Isometric "Engine" to AS3. Help please

**URL:** <https://forum.kirupa.com/t/migrating-tile-isometric-engine-to-as3-help-please/229254>\
**Category:** flash\
**Created:** [June 15, 2007, 7:56am UTC](https://forum.kirupa.com/t/migrating-tile-isometric-engine-to-as3-help-please/229254 "2007-06-15T07:56:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dzhedzho](https://avatars.discourse-cdn.com/v4/letter/d/ce7236/32.png) [@dzhedzho](https://forum.kirupa.com/u/dzhedzho)\
**Post date:** [June 15, 2007, 7:56am UTC](https://forum.kirupa.com/t/migrating-tile-isometric-engine-to-as3-help-please/229254/1 "2007-06-15T07:56:53Z")

</div>

Hello there folks. As the title suggests I am migrating a my tile isometric scripts to AS3. So pretty much what the whole thing does is is you click a certain floor tile and you have object inserted there. As I am total newb with AS3 I problems were to be expected. No the problem is not the change of the z sorting model, I took care of that. The problem is something much more “serious”. In the AS2 version I had a great number of library symbols, with linkage identifiers which were stored in an array. Then on the press of a tile I attached a symbol of my liking, (selected prior to the tile click). Something remotely similar to the following;

```auto

var objects:Array = ["Box1","Box2","Box3"];
//........................
var selected:Number=2;
//.......................
content_mc.attachMovie(objects[selected],"someName",content.getNextHighestDepth());

```

Ok, thats an oversimplified version of it but hope you get the idea. Now in AS3 the library symbols are classes by themselves. Therefore I have to use the following syntax:

```auto

var someName:Box1 = new Box1();

```

So I have pretty much no idea how can I achieve what I want. Only thing which comes to mind is create array of (few hundred :stare:) simple functions, and use the appropriate one.

```auto

var funcs:Array=new Array();
funcs[0]=function () {
var box1:Box1=new Box1();
return (box1);
};
funcs[1]=function () {
[LEFT]var box2:Box2=new Box2();
[/LEFT]
return (box2);
};
//.....................
var selected:Number=2;
//.....................
funcs[selected]();

```

Any better ideas?  
Thank you
