I'm running through a pretty simple Flash based website tutorial from ActiveTuts. Any who, I'm attempting to convert one of my HTML5/CSS3 designs into Flash as a learning experience. Currently, I have navigation that is the width of the stage (so each child is the width of the stage - 980px). I would like to have each navigation element on it's own line - as of now, and after hours of searching Google I'm only able to have navigation children added horizontally instead of my vertical goal.
To sum it up, all new children are added horizontally and thus off stage, I would like to have them display one under another. I'm decently experienced in PHP/Java/C# etc. but completely new to AS3. Perhaps I'm getting a bit over my head diving headfirst this way into AS3 :x.
Here is the code:
var navContainer:Sprite = new Sprite;
addChild(navContainer);
var navArray:Array =["Home","About","Work","Contact"];
for(var i:Number=0;i<4;i++){
var navItem:NavItem = new NavItem;
navItem.x = navItem.width*i;
navItem.nav_name.text = navArray[i];
navContainer.addChild(navItem);
navContainer.alpha = 0.7;
navContainer.width = stage.stageWidth;
navContainer.y = stage.stageHeight - (stage.stageHeight/1.25);
For what it's worth, I'm running through http://active.tutsplus.com/tutorials/web-design/create-a-full-screen-scalable-flash-website-part-1/