public function createNewButton(event:MouseEvent):void {
var myButton:Button = new Button();
myButton.label = "Create Button";
myButton.toolTip = "tooltip.";
myButton.addEventListener(MouseEvent.CLICK, createNewButton);
addChild(myButton);
}
click="createNewButton(event);" />