Adjust Dynamic Text width to its content

Hi,

in my multi language flash animation, i allow users to select the interface language.
in order to remind them what language they chose, i display it into a dynamic text field.

However, as this text field is overlapped with a buttonclip, i would like to auto adjust the dynamic text field with its content… and on the same time to do it also for the overlapping button. (this button allow end user to display the dialog box to choose another language)

to understand it, let’s take an example. Application has the following languages : English, French, Spanish and Slovak.

each time that user select a language, the dynamic text field should display : the word “language” in the selected language + " : " + “language” word in the selected language.

so something like :

Language : English
Langue : Francais
Idioma : Espanol
Jazyk : Slovak

now, you can easily understand that the auto adjustment is a good choice to avoid a too large or too smal button and also text field (to display the whole words)

How can i do that ?
is there something under AS3, which count pixels or width of a sentence ?

thanks a lot,

A.