Ok, so I'm making a game in flash CS3 and I want the
character to be able to move to other rooms when they hit something
like a door. The way I'm doing it is actionscript goes to another
frame when the player movie clip, gpb, hits the door. But it keeps
coming up with an error that says "TypeError: Error #2007:
Parameter hitTestObject must be non-null." I have no idea what's
wrong with it.
Here's the code for what I'm trying to do:
gpb.addEventListener(Event.ENTER_FRAME, collide)
function collide(e:Event){
if(gpb.hitTestObject(door)){
gpb.x=600
gotoAndPlay(3);
}
}