Enemies help

i have this mc and you could move it and i have an enemy mc
how or whats the actionscript so that when you get close it moves away
like running away:pleased: