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.