Shooting on angles

Can sombody tell me how i would make this http://www.actionscript.org/tutorials/advanced/weapon_manufacturing_101/index.shtml so i cant click to make it shoot instead of it randomly shooting all the time, thanks.