I have my character and is gun. The gun has is own class, and the enemies too. I am attaching the shots from the enemy class, and attaching the enemy from the stage.
My problem come when the shots collide with the enemy’s. It goes like this:
1.When the character is close to the enemy’s the collide works well and the lifebar of the enemy decreasing.
2.When the character is far from the enemy’s the collide works just if: you press the mouse and release and just the latest shot collide and decreasing the life of the enemy.
The check of the hitTest is in onEnterFrame handler in the class of the enemy. But you know what ? i think the problem isn’t come from the hitTest, but i cant figure from what…
To show you example, click on left mouse to attach the shots:
and you can download the source (attach file).
Someone can think about something ? why ? what is the solution ?