Elastic CSS-like background/containers for dynamic text fields in flash?

Elastic CSS-like background/containers for dynamic text fields in flash? :mario: Anyone ever pondered this one? In CSS it looks like this:

box {
  background: url(img/div-bottom.gif) no-repeat bottom left;
  }

.box h3 {
  background: url(img/h3-bg.gif) no-repeat top left;
  }

I’m trying to create a dynamic text field on top of a nifty rounded button that conforms to fit the amount of text entered short of creating a lengthy function.