I have some code like this:
for (var yt:int = 0; yt < mapH; yt++) {
for (var xt:int = 0; xt < mapW; xt++) {
drawTile(s, xt, yt);
}
}
Which will look through a 2 dimensional array, then I need to create a new MovieClip for each value in that array, using something like this:
var mc:tile_mc = new tile_mc();
Except it needs to make more than one of these movieclips (all with different names), and I need to be able to pass to movieclip name through the drawTile() function, or have some way of knowing what it is for the current loop…
Is there some way that I can like make the name of the movie clip “tile_” + yt + “_” + xt ? Since yt and xt change every loop and I’m already passing those values through drawTile