ActionScript 3.0 :: Adding Menu Items Dynamically?Feb 4, 2010
1. An XML list, which works just fine, retrieves between 3 and 15 strings (or menu names). These menu names are put into an array called, "aGalleryMenuID".
2. I want to be able to create a MovieClip and TextField dynamically for each string and place them on the stage dynamically. So if there are only 5, it will make five. 3 will only make 3. The long way of doing this is to create 15 MovieClips and 15 TextFields and use a loop to use addChild. This is okay, but what if later it is decided there needs to be 30 menu items. I want to avoid that and make this future proofed.
for loop that loops through the # of array items in aGalleryMenuID
set the MovieClip's name to a unique identifier
set the TextField's name to a unique identifier