Simple Hit test
Hey I have a movie clip with a layout of
1. PEnemy
2. Enemy
3. enemy
then animations and on some frames a MC with an instance name of 'hit'
My movie clip animates and I want to detect hit Test with another child from another movie clip called 'you' with a child MC called 'target'
So bacicly I want
PEnemy.Enemy.enemy.hit to hitTest you.target
I dont understand hit tests that well in as3 This is what I have:
if (you.Target.hitTestObject(PEnemy.spawn.enemy.hit));
But it is not working
I also get this in output:
TypeError: Error #2007: Parameter hitTestObject must be non-null.
at flash.display::DisplayObject/_hitTest()
at flash.display::DisplayObject/hitTestObject()
at eugenehoudin5AS3_fla::MainTimeline/EnterFrame()
