The best thing you can do right now is really break down the behaviour as much as you can. I'll help get you started.
Enemy 1. You can place 'invisible' sprites on the ground that when he hits will turn him and make him walk the other way.
Combine this with a distance check - OR - again place invisible sprites at image points on your player at the appropriate distances - and when the enemy touches it order him to fire.
I know exactly where you are right now - because i was there myself a couple of months ago. The best advice I can give is to scour the HOW DO I forum - Study all the example cap.x's (even if they dont make sense to you right now) and then read the manual. Anything you struggled to understand should make sense at that point.