Horizontal align components inside HBox from Action Script

actionscript, alignment, apache-flex, flex3, hbox

Solution

Try this:

setStyle("horizontalAlign", "center");

Problem

Is there any way to set horizontalAlign from Action Script not from mxml?

Original source