views:

1686

answers:

1

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

+5  A: 

Try this:

setStyle("horizontalAlign", "center");
sharvey
Yes, if you check the documentation, anything listed under styles must be set using a call to setStyle() rather than directly as a property.
joshtynjala