# FMX collision detection

**URL:** <https://forum.kirupa.com/t/fmx-collision-detection/6832>\
**Category:** flash\
**Created:** [October 17, 2002, 12:03pm UTC](https://forum.kirupa.com/t/fmx-collision-detection/6832 "2002-10-17T12:03:50Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![pat](https://avatars.discourse-cdn.com/v4/letter/p/8491ac/32.png) [@pat](https://forum.kirupa.com/u/pat)\
**Post date:** [October 17, 2002, 12:03pm UTC](https://forum.kirupa.com/t/fmx-collision-detection/6832/1 "2002-10-17T12:03:50Z")

</div>

I’m working on this game in flash,  
where U have to hit cows out of the air with tomatoes (I know, it sounds a bit silly but actually I just don’t like cows that much!!) What I need to know is how I can tell the movieclip from the cow to play when collided with the clip from the tomato! I hope its is a bit clear for you, and that u can give me some advice… thx in advanced!pat!

---

<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:** [October 17, 2002, 1:40pm UTC](https://forum.kirupa.com/t/fmx-collision-detection/6832/2 "2002-10-17T13:40:39Z")

</div>

Hi Pat,  
I don’t understand the problem: is it the collision detection that is the trouble, or is it that you want to tell a particular cow to play something?

pom :asian:

Can you take 2 minutes to vote for the contest, please? It’s [HERE](http://www.kirupaforum.com/showthread.php?s=&threadid=7450)

---

<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:** [October 17, 2002, 1:53pm UTC](https://forum.kirupa.com/t/fmx-collision-detection/6832/3 "2002-10-17T13:53:59Z")

</div>

HI ,

A made a movie clip off the cow “exploding” with a stop at the first frame. what i want is that if you throw a tomato and its collides with the cow… the movie clip of the cow should play the next frames so you actually see the explosion! If all this sounds to wierd, maby I can send you the .fla I working on! cheers pat!

---

<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:** [October 17, 2002, 2:06pm UTC](https://forum.kirupa.com/t/fmx-collision-detection/6832/4 "2002-10-17T14:06:17Z")

</div>

I understand what you are trying to do 🙂 But you don’t tell me WHERE the problem is. Did you manage to throw the tomato? Check the hitTest? Vote for the contest? Know which cow was hit?

pom :cowboy:

---

<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:** [October 17, 2002, 2:23pm UTC](https://forum.kirupa.com/t/fmx-collision-detection/6832/5 "2002-10-17T14:23:08Z")

</div>

I can trow tomatoes and I have cows flying around!  
I’ve read this tut. ([http://www.kirupa.com/developer/actionscript/hittest.asp](http://www.kirupa.com/developer/actionscript/hittest.asp))  
I and Iunderstand it! But instead of showing txt on collision I would like the mc-cow to play! I’m trying to get the game online somewhere so you can see what I mean!  
pat!

---

<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:** [October 17, 2002, 2:36pm UTC](https://forum.kirupa.com/t/fmx-collision-detection/6832/6 "2002-10-17T14:36:55Z")

</div>

here it is!  
[http://www.browne.nl/cow/](http://www.browne.nl/cow/)  
maby it helps

---

<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:** [October 17, 2002, 9:21pm UTC](https://forum.kirupa.com/t/fmx-collision-detection/6832/7 "2002-10-17T21:21:19Z")

</div>

well, here’s what I would do: when the tomato is the smallest, it checks whether it touches any cow. If it does, then you knowwhich cow it is, and all you have to do it \_root.theRightCow.play();

I’ll try and make an example file but it would be easier if Flex was here…

pom :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:** [October 17, 2002, 9:26pm UTC](https://forum.kirupa.com/t/fmx-collision-detection/6832/8 "2002-10-17T21:26:51Z")

</div>

Who’s Flex?

Btw, if you dbl click on a cow it reacts as if you’ve hit with tomato

---

<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:** [October 17, 2002, 9:39pm UTC](https://forum.kirupa.com/t/fmx-collision-detection/6832/9 "2002-10-17T21:39:18Z")

</div>

Flex is the game master here… on vacation for the moment it seems.

---

<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:** [October 17, 2002, 9:44pm UTC](https://forum.kirupa.com/t/fmx-collision-detection/6832/10 "2002-10-17T21:44:19Z")

</div>

OK, here’s the killer TomatoThrower game. 😛

pom :cowboy:

Can you take 2 minutes to vote for the contest please?

---

<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:** [October 18, 2002, 10:43am UTC](https://forum.kirupa.com/t/fmx-collision-detection/6832/11 "2002-10-18T10:43:22Z")

</div>

Hi pom, thx for your replies and the example .fla (nice cows!!!) I’ll have to figure out how it works :cyclops: let you know when I’ve got it working! cheers pat!

---

<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:** [October 18, 2002, 10:30pm UTC](https://forum.kirupa.com/t/fmx-collision-detection/6832/12 "2002-10-18T22:30:31Z")

</div>

Glad you like it 😛
