ACK! i am stuck =[

ok so heres the problem
I need a life counter similar to mario or sonic side-scrolling games where if the MC of the enemy hits the MC of my character it will subtract 1 life, yet no matter how hard i try to come up with it it never works for me. I have visited countless tutorial site but still have not figured it out:m:

any suggestions/help would be greatly appreciated:angel:

add trace(“Hit”); within the hitTest code block, if you don’t get “Hit” in the console then your comparing undefined objects. Try add the _root prefix or use the target sign above your action script panel to locate the two parts you wish to hitTest. So you would go

if(this.hitTest(_root.MovieClipToCollideWith))
{
_root.hp–;
}