I need to be able to set a property of the 3rd textfield created within this for loop:
for (var i:int = 0; i < menuArray.length; i++) {
menuText = new TextField;
menuText.name = "navBttn_" + i;
menuText.x = xCoord;
menuText.y = (i * 20) + yCoord;
//
menuText.text = menuArray*;
//
addChild(menuText);
//
menuText.addEventListener(MouseEvent.ROLL_OVER, MainRollOver);
menuText.addEventListener(MouseEvent.ROLL_OUT, MainRollOut);
menuText.addEventListener(MouseEvent.CLICK, onMainSelectItem);
}
//Change property of 3rd textfield here
What’s the best way to target that object?