# {F8} flash newbie vrs kirupa hit test tutorial

**URL:** https://forum.kirupa.com/t/f8-flash-newbie-vrs-kirupa-hit-test-tutorial/217530
**Category:** flash
**Created:** [February 27, 2007, 7:00pm UTC](https://forum.kirupa.com/t/f8-flash-newbie-vrs-kirupa-hit-test-tutorial/217530 "2007-02-27T19:00:27Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![idoru](https://avatars.discourse-cdn.com/v4/letter/i/cab0a1/32.png) [@idoru](https://forum.kirupa.com/u/idoru)
#### Post date: [February 27, 2007, 7:00pm UTC](https://forum.kirupa.com/t/f8-flash-newbie-vrs-kirupa-hit-test-tutorial/217530/1 "2007-02-27T19:00:27Z")

</div>

Hi there!  
I’ve just used the hit test tutorial for my scrolling gallery, now I want to add roll over buttons on the sides to reverse the movement of the movie.  
Here is the hit test script:  
onClipEvent (enterFrame)

{ move = this.\_x;  
if (number == 1) {  
this.\_x = move-1;  
}  
if (number ==2) {  
this.\_x = move+1;  
}

```
if (this.b, hitTest(_root.right1)) {
number = 1;
}
if (this.a, hitTest(_root.left1)) {
    number = 2;
}

```

}

and here is the button…  
on (rollOver) {  
}  
I have no idea what to put inside! something saying if this = .\_x +1; then make it do this.\_x - 1; and vise versa…  
Can someone let me know or what tutorial will teach me how to write it?  
Thanks you!🐇
