# gotoAndStop in hitTest

**URL:** <https://forum.kirupa.com/t/gotoandstop-in-hittest/623>\
**Category:** flash\
**Created:** [July 24, 2002, 6:52am UTC](https://forum.kirupa.com/t/gotoandstop-in-hittest/623 "2002-07-24T06:52:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![paopei](https://avatars.discourse-cdn.com/v4/letter/p/90ced4/32.png) [@paopei](https://forum.kirupa.com/u/paopei)\
**Post date:** [July 24, 2002, 6:52am UTC](https://forum.kirupa.com/t/gotoandstop-in-hittest/623/1 "2002-07-24T06:52:35Z")

</div>

:ninja: i have problem about hitTest method. i create a game and i wrote script as follow :

if(mymovieclip, hitTest(target)){  
this.gotoAndStop(2);  
//2 is frame that execute certain action or changing  
}

but that script won’t work. but in this code (action of certain button) :

on(release){  
mymovieclip.gotoAndStop(2);  
}

and that works! is there somebody who can explain those problems.  
thanks=)

---

<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:** [July 24, 2002, 2:03pm UTC](https://forum.kirupa.com/t/gotoandstop-in-hittest/623/2 "2002-07-24T14:03:28Z")

</div>

```auto
this.gotoAndPlay(2);

```

Ask yourself: what does the this. refer to? And you’ll find your answer. Free… your… mind.

morpheus :asian:

---

<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:** [July 25, 2002, 1:52am UTC](https://forum.kirupa.com/t/gotoandstop-in-hittest/623/3 "2002-07-25T01:52:00Z")

</div>

> \*Originally posted by ilyaslamasse \*  
> \*\*

```auto
this.gotoAndPlay(2);

```

Ask yourself: what does the this. refer to? And you’ll find your answer. Free… your… mind.

morpheus :asian: \*\*

i refer this to mymovieclip because the script is attached to mymovieclip.:rambo:
