# What object do I pass hitTestObject(...)?

**URL:** <https://forum.kirupa.com/t/what-object-do-i-pass-hittestobject/226509>\
**Category:** flash\
**Created:** [May 21, 2007, 11:51pm UTC](https://forum.kirupa.com/t/what-object-do-i-pass-hittestobject/226509 "2007-05-21T23:51:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![imadingo](https://avatars.discourse-cdn.com/v4/letter/i/838e76/32.png) [@imadingo](https://forum.kirupa.com/u/imadingo)\
**Post date:** [May 21, 2007, 11:51pm UTC](https://forum.kirupa.com/t/what-object-do-i-pass-hittestobject/226509/1 "2007-05-21T23:51:36Z")

</div>

I currently have a Player class, extending MovieClip, which I have setup to respond to key presses. He moves around, etc. Now, I created a library movieclip called Bush, just a standard looking plant.  
In the onEnterFrame function for my player class (I have the listener setup), I want to have a section with collision detection. I figure I should do something like:  
if (hitTestObject(Bush)) \<code to bounce back\>

Problem is, flash tells me Bush is an unknown variable. So I tried linking the bush to a class, but then flash tells me I’m trying to use a class instead of a DisplayObject…  
How do I do this? I want to be able to create as many instances of the library Bush object and have my player not pass through each.
