hitTest not working


I am using the following script to set up a hitTest. The basic hitTest works fine, but the second part of the if statement (&& (_root.w2._currentframe==1||2)–see below) doesn’t have any effect. I am trying to set limitations on the hitTest so that “this.responsew1” only moves to the next frame if both conditions of the if statement are met.

I must be doing something wrong, but lord help me, I don’t see what!

Can anyone help? It would be greatly appreciated!!!

onClipEvent (enterFrame) {
if (this.hitTest(_root.w2) && (_root.w2._currentframe==1||2)) {
with (this.responsew1) {
if (_currentframe == 1) {
gotoAndPlay(2); }