How to dynamically generate buttons in AS3?

I just need to be steered in the right direction. In AS3-CS3, we can’t apply code to objects anymore, right?

My old method for creating buttons off an original was to create an instance in the library and set it for export. Then I would duplicate it onto the stage at runtime, dynamically setting each button’s action and text at that time.

Now in AS3, What do I do? Create a class that can be applied to buttons or something?

Dunno the best way to do it now. I’m thinking of creating a listener that listens to all my buttons I create at runtime, and does an action based upon the instance of the button pressed. :look: