# hitTest() problem geting me irretated

**URL:** <https://forum.kirupa.com/t/hittest-problem-geting-me-irretated/183397>\
**Category:** flash\
**Created:** [March 26, 2006, 6:46pm UTC](https://forum.kirupa.com/t/hittest-problem-geting-me-irretated/183397 "2006-03-26T18:46:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![butman](https://avatars.discourse-cdn.com/v4/letter/b/ee7513/32.png) [@butman](https://forum.kirupa.com/u/butman)\
**Post date:** [March 26, 2006, 6:46pm UTC](https://forum.kirupa.com/t/hittest-problem-geting-me-irretated/183397/1 "2006-03-26T18:46:59Z")

</div>

[CENTER][FONT=Tahoma][SIZE=6]HitTest(Ⓜ)[/SIZE][/FONT][/CENTER]  
[LEFT][FONT=Tahoma][/FONT]  
[FONT=Tahoma][COLOR=black]My code don’t wont to work!!![/COLOR][/FONT]  
[FONT=Tahoma]Heres the code:[/FONT]  
[FONT=Tahoma](putted it into a movieClip called “rectangle”)[/FONT]  
[FONT=Tahoma][/FONT]  
[FONT=Tahoma][/FONT]

```auto
onClipEvent(enterFrame){
     if(this.hitTest(_parent.bomb)){
          _alpha=100;
     }
}

```

thanks  
Albert:beer: [/LEFT]

---

<div class="post-metadata">

**Author:** ![stereochris](https://avatars.discourse-cdn.com/v4/letter/s/f4b2a3/32.png) [@stereochris](https://forum.kirupa.com/u/stereochris)\
**Post date:** [March 26, 2006, 10:51pm UTC](https://forum.kirupa.com/t/hittest-problem-geting-me-irretated/183397/2 "2006-03-26T22:51:42Z")

</div>

[CENTER][FONT=Tahoma][SIZE=6][/SIZE][/FONT][/CENTER]

[FONT=Tahoma][COLOR=black]My code don’t wont to work!!![/COLOR][/FONT][LEFT][FONT=Tahoma]Heres the code:[/FONT]  
[FONT=Tahoma](putted it into a movieClip called “rectangle”)[/FONT]

```auto
onClipEvent(enterFrame){
     if(this.hitTest(_parent.bomb)){
          _alpha=100;
     }
}

```

I’m notreally 100% sure, but you might want to change **“\_alpha = 100”** to **“this.\_alpha = 100”** , and / or make sure the **“\_parent”** is the right path. try \_root… or something  
[/LEFT]

---

<div class="post-metadata">

**Author:** ![bombsledder](https://avatars.discourse-cdn.com/v4/letter/b/958977/32.png) [@bombsledder](https://forum.kirupa.com/u/bombsledder)\
**Post date:** [March 26, 2006, 11:59pm UTC](https://forum.kirupa.com/t/hittest-problem-geting-me-irretated/183397/3 "2006-03-26T23:59:41Z")

</div>

you don’t need to change \_alpha=100 since \_alpha is in the scope of the object, so pretty much maybe you could post a .fla so i can check if \_parent.bomb is the right path
