import mx.controls.Button; public var button2:Button; public function createObject():void { button2 = new Button(); button2.label = "Click Me"; hb1.addChild(button2); }