I am trying to create a navigation element. The items in the navigation are created dynamically from data in an XML file. What I would like to do is create a new movie clip then place all of the navigation elements into that movie clip so I can move it around as one piece.
Here is a simplified example of my code:
var navContainer:MovieClip = new MovieClip(); //clip to add elements to
addChild(navContainer);
//Create nav elements that I want inside navContainer//
var reels:Array = [];
function createReels():void {
var reelPosX:Number = 336;
for each (var titleElement:XML in titleList) {
var reel:navReel = new navReel();
addChild(reel);
reel.width = 119;
reel.height = 119;
reel.x = reelPosX;
reel.y = 10;
reels.push(reel);
reelPosX+=155;
}
}
I hope this makes sense. Thanks.