I am developing a game, which has heads that popup at random
from behind two
hills. the user throws snowballs at the heads. I am using the
function to test for the collison. the problem i m having is
when the heads
are hidden, the hittest is still coming back as true if the
the area where the head is hidden. does anyone have any
I have 2 ideas for you. Not sure how easy they would be to
implement in to your current coding.
1) Use a flag variable that you would set to "true" if the
head was visible and "false" when not. Then when using the
hitTest() method you could also test to see if the variable was
also "true". If it was then it was a hit if not then nothing.
2) If your mask is a movieclip, the use the hitTest method on
the snowball and the head and also on the head and the mask. If
they both came back "true" then it would be a hit, otherwise not.