# Hittest actionscript 3

**URL:** <https://forum.kirupa.com/t/hittest-actionscript-3/325942>\
**Category:** flash\
**Created:** [November 13, 2011, 10:55am UTC](https://forum.kirupa.com/t/hittest-actionscript-3/325942 "2011-11-13T10:55:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![thomasthooft](https://avatars.discourse-cdn.com/v4/letter/t/e47774/32.png) [@thomasthooft](https://forum.kirupa.com/u/thomasthooft)\
**Post date:** [November 13, 2011, 10:55am UTC](https://forum.kirupa.com/t/hittest-actionscript-3/325942/1 "2011-11-13T10:55:32Z")

</div>

Hello,

I’m trying to check if 2 movieclips hit each other. I know you use the command “hitTestObject”. That is working good but I use this in combination with a tweenlite.to.

code: TweenLite.to(tvirus,1,{y:stage.stageHeight,ease:Linear.easeInOut,onUpdate:checkHit,onComplete:removeVirus})

protected function checkHit():void{  
if (zombie.hitTestObject(tvirus))  
{  
trace(“hit”)  
removeVirus();  
}  
}

protected function removeVirus():void{  
view.removeChild(tvirus);  
}

I have 2 problems. First with the hit test it have me 4 times hit instead of one time.  
The second problem is that he gave me an error on the removeChild.  
What are my errors ?
