I’m trying to create 3d array which holds movieclips and textfields. When I test the movie, textfields aren’t visible, they are behind movieclips (I guess so). I tried using setchildindex however it gave me error. Here’s my code.
for (var _x:int = 0; _x <= MAX_X; _x++)
{
for (var _y:int = 0; _y <= MAX_Y; _y++)
{
for (var _z:int = 0; _z <= MAX_Z; _z++)
{
if (_z == 0) {
// Create captions
var mcCaption:MovieClip = createMc("captionBox", false);
rowArray[_x][_y][_z] = mcCaption;
spSource.addChild(rowArray[_x][_y][_z]);
rowArray[_x][_y][_z].addEventListener(MouseEvent.MOUSE_DOWN, mcCaptionHandler);
rowArray[_x][_y][_z].x = nextXpos;
rowArray[_x][_y][_z].name = "beatCaption_" + _x + "_" + _y + "_" + _z;
} else if (_z == 1) {
var txt:TextField = new TextField();
rowArray[_x][_y][_z] = txt;
rowArray[_x][_y][_z].text = _y;
rowArray[_x][_y][_z].defaultTextFormat = caption_tf;
rowArray[_x][_y][_z].setTextFormat(caption_tf);
spSource.addChild(rowArray[_x][_y][_z]);
rowArray[_x][_y][_z].addEventListener(MouseEvent.MOUSE_DOWN, mcCaptionHandler);
rowArray[_x][_y][_z].x = nextXpos;
}
}
nextXpos = nextXpos + newMcWidth;
}
...