In my applications I have to generate a button dynamically and have to keep a click handler for the same. How to write script for clicking button?
I'm using following code for creating button dynamically
var btn:Button = new Button;
btn.label = "Print";
whats for click?