Can you autoSize dynamic text?

I have two dynamic text fields on the stage. How can set the text to autoSize?
I have this, but it’s not working.


w.text.autoSize = true;
w.text = "100";
h.text.autoSize = true;
h.text = "100";