# basicHitTest

**URL:** <https://forum.kirupa.com/t/basichittest/211579>\
**Category:** flash\
**Created:** [January 3, 2007, 9:54am UTC](https://forum.kirupa.com/t/basichittest/211579 "2007-01-03T09:54:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Asa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/asa/32/3146_2.png) [@Asa](https://forum.kirupa.com/u/Asa)\
**Post date:** [January 3, 2007, 9:54am UTC](https://forum.kirupa.com/t/basichittest/211579/1 "2007-01-03T09:54:21Z")

</div>

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… 😉 )  
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;
