Tower Defense Game

Hi guys, I’m new to actionscript and am trying to make a tower defense game for a flash class. I’m having trouble figuring out how to get the turrets to rotate and track the enemies and fire when they’re in a certain range. I’ve found several tutorials that show how to make a turret track and fire at your mouse, but I don’t know how to apply that script to this situation. Any help would be GREATLY appreciated.