# AS3 hero enemy hittest problem

**URL:** <https://forum.kirupa.com/t/as3-hero-enemy-hittest-problem/633648>\
**Category:** flash\
**Created:** [August 23, 2015, 12:14pm UTC](https://forum.kirupa.com/t/as3-hero-enemy-hittest-problem/633648 "2015-08-23T12:14:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ekoneo](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ekoneo/32/8893_2.png) [@ekoneo](https://forum.kirupa.com/u/ekoneo)\
**Post date:** [August 23, 2015, 12:14pm UTC](https://forum.kirupa.com/t/as3-hero-enemy-hittest-problem/633648/1 "2015-08-23T12:14:51Z")

</div>

Hi,  
I have been used AS2 up to now. But I need learn AS3 what I can do in AS2.  
I try to make a simple game as shown in attachment. I prepare two mc and they are in library. The main stage is empty. First one is hero. The other is enemy. When game is starting hero and 3 enemy movie clips is goingto load to the stage. Enemies have a class as “enemy.as” and they are moving randomly. Hero can be controlled with mouse. I nee the get any action when the enemy mc hits the hero mc. I read messages. But I get 1046 errors. I spent too much time. At the end I accept my fail. To learn the true solution I am writing now here. Please help me.  
Thanks already.

 ![](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/2X/c/ca62d801ba550cf57e4c66227ab4302608c0d87f.png)

---

<div class="post-metadata">

**Author:** ![zeke\_chan](https://avatars.discourse-cdn.com/v4/letter/z/f14d63/32.png) [@zeke\_chan](https://forum.kirupa.com/u/zeke_chan)\
**Post date:** [August 24, 2015, 1:13am UTC](https://forum.kirupa.com/t/as3-hero-enemy-hittest-problem/633648/2 "2015-08-24T01:13:52Z")

</div>

Hye ekeneo, do post your codes as well if you need help with it. It’s difficult to know what’s wrong based on your description alone.
