I am currenly trying to make a shooting game in flashmx. I have made my crosshair (aimer) which i have assigned to move around the sceen useing the arrow keys and i have a gun that can move left and right only. I also have some of my targets, i can make it so when my cross hair hits the target something happens but what i really want to do but can’t is assign space as the shoot button and when the crosshair goes over the target and space is pressed simmutaniously something happens, any ideas how I can do this?
if(Key.isDown(Key.Space) && crosshair.hitTest(_root.target))
It’s a quick and easy piece of code that should get done what you wnat… of course for as many targets as you have in the scene you will wnat to have a for loop going through all of them…