The following function is not working...why?

function glowMe(p_mc, p_play, p_stop){
if(p_mc.onRollOver){
p_mc.gotoAndPlay(p_play);
}
else{
if(p_mc.onRollOut){
p_mc.gotoAndStop(p_stop)
}
}
}
glowMe(blue_mc, 2, 1);