I'm creating a number of objects dynamically in actionscript. then I'm using setStyle to set certain styles before addChild actually adds the object to the container. The setStyle is not working. Below is a small piece of the code.
varnewButton:Button = new Button;
newButton.label="Update";
newButton.setStyle("bottom","10");
newButton.addEventListener(MouseEvent.CLICK,clickUpdate);
newHBox.addChild(newButton);

