Horizontal align components inside HBox from Action Script

zvjerka24 picture zvjerka24 · Oct 17, 2009 · Viewed 7.4k times · Source

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

Answer

sharvey picture sharvey · Oct 17, 2009

Try this:

setStyle("horizontalAlign", "center");