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 ?