Minimize textframe for text in fla?

In JSFL.
I’m trying to do the equivalent of:
text.width = text.textWidth;
text.height = text.textHeight;

Can’t seem to crack it. Anyone knows the answer to this?