Collision Problems

Okay, i have my programming set up so that if two objects collide it will go to a different frame. The piece of code is below.

 onClipEvent (enterFrame) {
        if (_root.A-17, hitTest(_root.alien_fighter)) {
              _root.


        } else {
              ;
        }
    }

But instead of waiting for collision to happen it goes to another frame right away, i think its because of this piece of coding.

onClipEvent (enterFrame) {

i think i need to change the (enterFrame) to something else so it won’t just gotoAndPlay (3); like it usually does, any help would be wonderful!!

can you repost your code please - im pretty sure you missed parts

also - your problem is likely here if (_root.A-17, hitTest(_root.alien_fighter)) - that doesnt seem like a valid condition to me…

i got the code from this kirupa tutorial http://www.kirupa.com/developer/actionscript/hittest.htm

granted that tutorial was for flash 5, i believe it should still work here should it not?

im not sure about the rest of the code i dont really have time right now to comb through it but if its going to the next frame right away try putting stop(); in the frame and also using gotoAndStop(frame); instead of gotoAndPlay(frame);
:beer:

okay… not sure that will work cause here is my exact reason for needing the collision. I have a aircraft image, that when you press up it goes up, down it goes down, and so on. So unless you press and arrow key it doesn’t go anywhere, i have another object (on the otherside of the flash file, so there not touching) that when you move the aircraft to the other object it will go to that frame, but its not doing that for some reason, its justs automatcially going to the frame for (If there is a collision)