Create two button movieclips on your stage.
Give one an instance name of bButton1 and the other bButton2.

Add this code to your actions:

bButton1.addEventListener(MouseEvent.ROLL_OVER,fOver);
bButton2.addEventListener(MouseEvent.ROLL_OVER,fOver);

function fOver(evt:Event):void {
tText.text="Over "+evt.target.name;
trace("Over "+evt.target.name);
}

EXAMPLE:

Get Adobe Flash player