Hi
I am attempting to make a little flash game and have run into some problems with the hit test.
I have a wall and when the ship hits the wall, the ship bounces back, so for that I used this code
onClipEvent (enterFrame) {
while (this.hitTest(_root.shuttle.hitarea)) {
_root.shuttle._x = _root.shuttle._x+120;
but this only works for one side of the wall, so I have 4 hit areas set up all using the same code as above but with the +120 being -120 and changing to the y value for the top and bottom.
This works ok but it has afew glitches, for instance, the left side of thw wall holds up ok but the right side seems to let the ship pass straight through fairly easily. so heres my questions.
Is there a way that I can just use one code for the entire object instead of 4 hit areas and 4 bits of code ?
failing that can anyone take a look at the fla attached and see why the right side of the wall fails after a few hits ?
even if somebody could point me in the right direction that would be great
Any help would be appreciated …
Thanks
Sig