# Hittest REALLY BASIC QUESTION!

**URL:** https://forum.kirupa.com/t/hittest-really-basic-question/137727
**Category:** Uncategorized
**Created:** [February 17, 2005, 12:33am UTC](https://forum.kirupa.com/t/hittest-really-basic-question/137727 "2005-02-17T00:33:36Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![pachrist](https://avatars.discourse-cdn.com/v4/letter/p/13edae/32.png) [@pachrist](https://forum.kirupa.com/u/pachrist)
#### Post date: [February 17, 2005, 12:33am UTC](https://forum.kirupa.com/t/hittest-really-basic-question/137727/1 "2005-02-17T00:33:36Z")

</div>

I am just starting to learn Flash and am wondering how to do one thing in particular. I want to have bars move across the screen from left to right. Nothing advanced, just left to right continuously. I have tried modifying different tutorials but cant seem to figure out how to get the thing to move back to the left when it gets to a certain point on the stage. I tried using hitTest:  
onClipEvent (enterFrame) {  
speed = 2;  
this.\_x += speed;  
if (this, hitTest(\_root.block)) {  
this.\_x = -2;  
}  
}

But this doesnt work. It just makes the thing jump left, not reversse directions. Thanks for any help.
