Hi, var len:int = buttons.length; for (var i:int = 0; i < len; i++) { var obj:OBject = buttons[i]; var button:Button = new Button(); button.label = obj.label; container.addChild(button); }
I think you get the hint. This is VERY basic compared to what you can do dynamically. Depending on what is in the array, you could do fancy switches or even use getClassByDefinition() and create any loaded class component you want. Peace, Mike On 5/31/07, Dave @ VitalPodcasts.com <[EMAIL PROTECTED]> wrote:
Is there are resources out there on how to create, let's say a button, on the fly with Code? Im trying to create an Array, and I want to loop around it to create a list of Buttons for navigation.
-- Teoti Graphix http://www.teotigraphix.com Blog - Flex2Components http://www.flex2components.com You can find more by solving the problem then by 'asking the question'.