# Another coding problem

**URL:** https://forum.kirupa.com/t/another-coding-problem/22827
**Category:** flash
**Created:** [June 9, 2003, 12:08pm UTC](https://forum.kirupa.com/t/another-coding-problem/22827 "2003-06-09T12:08:44Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![luster](https://avatars.discourse-cdn.com/v4/letter/l/ec9cab/32.png) [@luster](https://forum.kirupa.com/u/luster)
#### Post date: [June 9, 2003, 12:08pm UTC](https://forum.kirupa.com/t/another-coding-problem/22827/1 "2003-06-09T12:08:44Z")

</div>

Hi,

I tried the tutorial on hitTest, and I tried to make something using that. Now, I have a problem, and I really dont see what’s wrong

I used this:

onClipEvent (enterFrame) {  
if (\_root.Projectiel, hitTest(\_root.Boot)) {  
gotoAndPlay( frame2 );  
}  
}

It has to go to frame 2 when “Projectiel” hits “Boot”  
But it doesnt do a thing. You guys know my fault?

---

<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: [June 9, 2003, 12:27pm UTC](https://forum.kirupa.com/t/another-coding-problem/22827/2 "2003-06-09T12:27:27Z")

</div>

[AS]onClipEvent (enterFrame) {  
if (\_root.Projectiel.hitTest(\_root.Boot)) {  
gotoAndPlay(2);  
}  
}  
[/AS]

BTW, do you speak dutch ? I was the word Projectiel in it en da gelijkt tamelijk wa op’t nederlands/vlaams :beam:

---

<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: [June 9, 2003, 12:32pm UTC](https://forum.kirupa.com/t/another-coding-problem/22827/3 "2003-06-09T12:32:01Z")

</div>

Either that or

```auto
onClipEvent (enterFrame) {
        if (_root.Projectiel.hitTest(_root.Boot)) {
                gotoAndPlay("frame2");
        }
}

```

If you want it to go to a frame that has the label “frame2” (no quotations)…

-M

---

<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: [June 9, 2003, 2:17pm UTC](https://forum.kirupa.com/t/another-coding-problem/22827/4 "2003-06-09T14:17:38Z")

</div>

Sorry, but that doesn’t semm to work. I’ll post my .fla , maybe you’ll find it.

PS= Ja, ik spreek Nederlands (Vlaams in mijn geval)

---

<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: [June 9, 2003, 2:22pm UTC](https://forum.kirupa.com/t/another-coding-problem/22827/5 "2003-06-09T14:22:27Z")

</div>

Here it is.

---

<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: [June 9, 2003, 3:58pm UTC](https://forum.kirupa.com/t/another-coding-problem/22827/6 "2003-06-09T15:58:45Z")

</div>

```auto
onClipEvent (enterFrame) {
	if (this.hitTest(_parent.boot)) {
		_parent.gotoAndPlay(2);
	}
}

```

---

<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: [June 9, 2003, 4:22pm UTC](https://forum.kirupa.com/t/another-coding-problem/22827/7 "2003-06-09T16:22:09Z")

</div>

Aah, it was in an external SWF ?

---

<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: [June 9, 2003, 4:29pm UTC](https://forum.kirupa.com/t/another-coding-problem/22827/8 "2003-06-09T16:29:56Z")

</div>

:stunned:

nope… what makes you think that!?

---

<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: [June 9, 2003, 4:47pm UTC](https://forum.kirupa.com/t/another-coding-problem/22827/9 "2003-06-09T16:47:22Z")

</div>

The \_parent code. ( Hey I’m here to learn 😛 )

---

<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: [June 9, 2003, 4:54pm UTC](https://forum.kirupa.com/t/another-coding-problem/22827/10 "2003-06-09T16:54:28Z")

</div>

oh!! 😛

sorry… :-  
i never use \_root. that way, if i ever want to load the swf dynamically, i don’t need to change a thing in the movie.
