# Weird hittest

**URL:** https://forum.kirupa.com/t/weird-hittest/38511
**Category:** Uncategorized
**Created:** [December 24, 2003, 4:15am UTC](https://forum.kirupa.com/t/weird-hittest/38511 "2003-12-24T04:15:02Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![zeka](https://avatars.discourse-cdn.com/v4/letter/z/c6cbf5/32.png) [@zeka](https://forum.kirupa.com/u/zeka)
#### Post date: [December 24, 2003, 4:15am UTC](https://forum.kirupa.com/t/weird-hittest/38511/1 "2003-12-24T04:15:02Z")

</div>

I have an rpg type game, and when you walk into and object the guy stops/ cant move. Now the guy is inside a house, and in the doorway is a rectangle with an instance name “door” with an alpha level of 0. When the character collides with “door” I want the movie to gotoAndPlay on frame 1 of scene 2. Can some please provide me with the actionscript so I can equip my guy with it.

Cheers :nose:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 24, 2003, 4:18am UTC](https://forum.kirupa.com/t/weird-hittest/38511/2 "2003-12-24T04:18:21Z")

</div>

[AS]onEnterFrame =function(){  
if(door.hitTest(guy.\_x,guy.\_y))  
gotoAndPlay(“Scene 2”,1);  
}  
[/AS]

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 24, 2003, 4:40am UTC](https://forum.kirupa.com/t/weird-hittest/38511/3 "2003-12-24T04:40:32Z")

</div>

still doesnt work. I just whipped this up then:
