[MX] hitTest Help!

Im using some actionscript in a button, it uses the on(keypress “< HOME >”) actionscript. Then it checks if a MC called neo has come into contact with an MC called openDoorE. It should then play an MC called wallEDoor. But it opens it regradless of whether neo has hit openDoorE. Here is the code im using.

on(keyPress “<Home>”){
if(_root.neo, hitTest(_root.openDoorE)){
_root.wallEDoor.play();
_root.switchDoorEhandle.nextFrame();
}
}

Help appricated!?!?!?!

:thumb:

in the ** on(keypress “”) ** there should be the HOME key but because it has HTML tags round it in the actionscript it didny show up

your hitTest is wrong… try this instead:

if (_root.neo.hitTest(_root.openDoorE)) {

by the way, welcome to kirupa forum!! =)

Thanx for the help Kax

no problem, keith. =)