Box resizing around content

Hello everyone and thank you for reading,

I thought that in the past I had seen a tutorial on this site teaching how to have a outlined box scale smaller and larger when a button is clicked, and the size of the box scales to a certain size depending on what loads inside the box. When this happens the outline does not change either. This all being done in most likely actionscript?

Well I have searched extensively and have not found it on this site, which I thought is where I had seen it. Anyway I was wondering if anyone knew of the tutorial or if they could tell me how to do what I have exlained above that would be really awesome! Thank you again!

-jw