Create a Button control and adds it to a container
<?xml version="1.0"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Box id="box1" width="200"> <mx:Button id="button1" label="Submit" /> </mx:Box> </mx:Application> <!-- var box1:Box = new Box(); box1.width=200; var button1:Button = new Button() button1.label = "Submit"; box1.addChild(button1); -->