enemy movement

ok...so i want an enemy to move around on the screen (say up and down)...BUT when the player comes into range, the enemy will start to follow and collide with the player ....but also if the player "out runs" the enemy, the enemy will go back to moving up and down.
....any tutorials or videos on this? .thanks, Steve
....any tutorials or videos on this? .thanks, Steve
Comments
35 second mark you will see a bat...
Darren.
http://www.deepblueapps.com/Deep_Blue_Ideas_Ltd./GSTemplatePFT.html