Skip to content

Instantly share code, notes, and snippets.

@IQAndreas
Created June 12, 2012 09:17
Show Gist options
  • Save IQAndreas/2916415 to your computer and use it in GitHub Desktop.
Save IQAndreas/2916415 to your computer and use it in GitHub Desktop.
for (var i:int = 0; i < mcArray.length; i++)
{
var button:IDButton = new IDButton();
button.tf1.text = String(ID1[i])
button.tf2.text = String(ID2[i]);
button.tf3.text = String(ID3[i]);
button.tf1.selectable = false;
button.tf2.selectable = false;
button.tf3.selectable = false;
button.tf1.visible = false;
button.tf2.visible = false;
button.name = "MC" + String(i);
button.x = 0;
button.y = button.height * i;
button.addEventListener(MouseEvent.CLICK, mcClickHandler);
button.addEventListener(MouseEvent.ROLL_OVER, mcHoverHandler);
button.addEventListener(MouseEvent.ROLL_OUT, mcOffHandler);
container.addChild(button);
mcArray[i] = button;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment