How can I modify the following code to add 26px space between the 2nd and 3rd item in a vertical menu, and the same added space between the 5th and 6th items?
var xCoord:int = 100;
var yCoord:int = 10;
function initMenu():void {
for (var i:int = 0; i < menuArray.length; i++) {
menuText = new TextField;
menuText.name = "navBttn_" + i;
menuText.x = xCoord;
menuText.y = (i * 20) + yCoord;
}
}
I’m attaching an image so you can see what I’m talking about. I tried doing some things with a switch statement, but that seemed needless complex and not really programmatic.