ok there is a simple way to do this is making animation called : damaged
and this damaged will have the red frames with normal frames
red,normal,red,normal,red,normal .. so the red frame and normal will be created in any program like photoshop and so on...
also put these condtion on hitting event :
player is NOT playing "damaged" so while he is damaged he can't get hit