4

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

zvjerka24
  • 1,772
  • 1
  • 21
  • 27

1 Answers1

8

Try this:

setStyle("horizontalAlign", "center");
sharvey
  • 7,635
  • 7
  • 48
  • 66
  • 2
    Yes, if you check the documentation, anything listed under styles must be set using a call to setStyle() rather than directly as a property. – Josh Tynjala Oct 19 '09 at 19:47