basicHitTest

Hello! I have a problem with this basicHitTest and the temp2…??? (I´ve got 15 “obstacle” in this simple game where the player should go from start to gole without touching the walls. Now, the player can crash through the walls and go to gole like a winner… :wink: )
I hope someone can help me!

stop();
i=0;
spelare.onPress=function(){
this.startDrag();
};
spelare.onRelease=function(){
this.stopDrag();
};
function basicHitTest(){
for(i=1;i<=100;i++){
temp=“obstacle”;
temp2=temp+i;
if(spelare.hitTest(gameboard[temp2])) {
gotoAndStop(5);
}
}
}
onEnterFrame=basicHitTest;