# Playamarz

**URL:** https://forum.kirupa.com/t/playamarz/17174
**Category:** Uncategorized
**Created:** [April 2, 2003, 3:46am UTC](https://forum.kirupa.com/t/playamarz/17174 "2003-04-02T03:46:05Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![geestring](https://avatars.discourse-cdn.com/v4/letter/g/e19b73/32.png) [@geestring](https://forum.kirupa.com/u/geestring)
#### Post date: [April 2, 2003, 3:46am UTC](https://forum.kirupa.com/t/playamarz/17174/1 "2003-04-02T03:46:05Z")

</div>

if(\_root.bullet.hitTest(\_root.monster))  
{  
\_root.monster.gotoAndPlay(“death”);  
}

can you explain what each thing means? like where the instance names are and what the labels are? thx

---

<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: [April 2, 2003, 5:02am UTC](https://forum.kirupa.com/t/playamarz/17174/2 "2003-04-02T05:02:32Z")

</div>

copy and paste this text into flash. The reserved words will be highlighted in blue

---

<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: [April 2, 2003, 6:20am UTC](https://forum.kirupa.com/t/playamarz/17174/3 "2003-04-02T06:20:04Z")

</div>

[AS]if(\_root.bullet.hitTest(\_root.monster)) {  
\_root.monster.gotoAndPlay(“death”);  
}[/AS]

If the ‘bullet’ instance located on the **\_root** timelime collides with the ‘moster’ instance on the **\_root** timeline then go play frame label ‘death’ within the ‘monster’ movie clip.

That is pretty much what that script does, being as I cannot see your movie I don’t exactly know everything that is going on, but I think I am right on this one, actually I am quite positive. 😉

---

<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: [April 2, 2003, 6:32am UTC](https://forum.kirupa.com/t/playamarz/17174/4 "2003-04-02T06:32:52Z")

</div>

‘death’ is a frame label. You can either label your frames or use the actual frame numbers like:  
[AS]  
\_root.monster.gotoAndPlay(14);  
[/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: [April 2, 2003, 8:49am UTC](https://forum.kirupa.com/t/playamarz/17174/5 "2003-04-02T08:49:52Z")

</div>

They pretty much explained it buddy 🙂

playamarz :player:

---

<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: [April 2, 2003, 2:48pm UTC](https://forum.kirupa.com/t/playamarz/17174/6 "2003-04-02T14:48:30Z")

</div>

thx guys

---

<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: [April 2, 2003, 7:25pm UTC](https://forum.kirupa.com/t/playamarz/17174/7 "2003-04-02T19:25:08Z")

</div>

“Scene=Scene 1 copy, Layer=hotdogman, Frame=1: Line 1: Statement must appear within on/onClipEvent handler  
if(\_root.bullet.hitTest(\_root.monster))”

i named my monster movie clip as “monster” as the instance name, i named the label death. so why do i get this msg? o and i put the script on the monster

---

<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: [April 2, 2003, 8:09pm UTC](https://forum.kirupa.com/t/playamarz/17174/8 "2003-04-02T20:09:34Z")

</div>

You put the script on a frame instead of a movie clip, but the script above doesn’t have to be on an event handler so I have no clue how you even got that error. . . .

Posting the .fla would work best if you were able to, if not no big deal!

---

<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: [April 2, 2003, 10:37pm UTC](https://forum.kirupa.com/t/playamarz/17174/9 "2003-04-02T22:37:12Z")

</div>

k, heres a little example i made, but it does not work, maybe someone could modify it to work?

---

<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: [April 3, 2003, 12:44am UTC](https://forum.kirupa.com/t/playamarz/17174/10 "2003-04-03T00:44:21Z")

</div>

here’s my attempt at it. I’ve put the hittest actionscript in the monster MC and re-arranged your scripting for the timeline of the monster MC. So when the bullet hits the monster it will play the death scene.

---

<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: [April 3, 2003, 3:20am UTC](https://forum.kirupa.com/t/playamarz/17174/11 "2003-04-03T03:20:52Z")

</div>

k, the error mesg is gone now, but when i click the circle it still does not play the movie clip.
