creationComplete="initApp()">
private function initApp():void
{
myButton.addEventListener(MouseEvent.CLICK, clickHandler);
}
private function clickHandler(event:MouseEvent):void
{
myLabel.text="The " + event.type + " event was dispatched by " + event.target.id;
}