creationComplete="initApp()">
public function initApp():void {
button1.addEventListener(MouseEvent.CLICK, myEventHandler);
cb1.addEventListener(MouseEvent.MOUSE_DOWN, myEventHandler);
}
public function myEventHandler(event:Event):void {
switch (event.currentTarget.className) {
case "Button":
trace("Process Button click.");
break;
case "CheckBox":
trace("Process CheckBox click.");
break;
}
}