# If- statement question

**URL:** <https://forum.kirupa.com/t/if-statement-question/105493>\
**Category:** Uncategorized\
**Created:** [March 26, 2004, 5:37pm UTC](https://forum.kirupa.com/t/if-statement-question/105493 "2004-03-26T17:37:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cki](https://avatars.discourse-cdn.com/v4/letter/c/85f322/32.png) [@cki](https://forum.kirupa.com/u/cki)\
**Post date:** [March 26, 2004, 5:37pm UTC](https://forum.kirupa.com/t/if-statement-question/105493/1 "2004-03-26T17:37:35Z")

</div>

Hi,

In the following code the if statement baffles me.

onClipEvent (enterFrame) {  
//Generating movement  
var location;  
var i;  
location = this.\_x;  
i = 1+\_root.\_xmouse/5;  
if (this, hitTest(\_root.block)) {  
this.\_x = -1000;  
} else {  
this.\_x = location+i++;  
}  
//Clips are scaled according to y-mouse  
this.\_xscale = 40+\_root.\_ymouse;  
this.\_yscale = 40+\_root.\_ymouse;  
}  
after this there is a (,) not a (semicolon) before the call to hitTest. It works, goovy, but I’ve been unable to find a reference to why it does. I’m new to AS so I hope this question is not to simple.
