Create button in actionscript

How do I create a button & assign a value to a text box within it, in actionscript?

Can I create an instance of a button from the library dynamically?