View Full Version : flash games


Douglas
07-06-2005, 12:23 AM
im making a game where you have to shot targets from the lefthand side of the screen, i no how to move the character up and down but how do i make him shoot and hit moving targets (dont no that either)

Marianne
07-06-2005, 03:29 PM
have you got a bullet yet?
If you do, and it has instance name 'bullet', and your target has instance name 'target' you just add a hitTest
something like:


function checkhit() {
if (bullet.hitTest('target' )) {
trace("hit");
score ++;
or add any action you like here...
}
}
checkhitInterval = setInterval(checkhit, 33);
that way, whereever your moving target is, when the bullet hits the target, it counts as a hit.

Douglas
07-07-2005, 11:07 PM
thanks