# hitTest only the content of movieclip and not from 0,0 to \_width, \_height!?

**URL:** https://forum.kirupa.com/t/hittest-only-the-content-of-movieclip-and-not-from-0-0-to--width--height/206373
**Category:** flash
**Created:** [November 7, 2006, 4:56pm UTC](https://forum.kirupa.com/t/hittest-only-the-content-of-movieclip-and-not-from-0-0-to--width--height/206373 "2006-11-07T16:56:14Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![johnnyboy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/johnnyboy/32/1973_2.png) [@johnnyboy](https://forum.kirupa.com/u/johnnyboy)
#### Post date: [November 7, 2006, 4:56pm UTC](https://forum.kirupa.com/t/hittest-only-the-content-of-movieclip-and-not-from-0-0-to--width--height/206373/1 "2006-11-07T16:56:14Z")

</div>

[FONT=Verdana][SIZE=1][COLOR=black][COLOR=black][FONT=Verdana]Hey guys[/FONT][/COLOR][/COLOR][/SIZE][/FONT]  
[FONT=Verdana][SIZE=1][COLOR=black][COLOR=black][FONT=Verdana] [/FONT][/COLOR][/COLOR][/SIZE][/FONT]  
[FONT=Verdana][SIZE=1][COLOR=black][COLOR=black][FONT=Verdana]This is probably just a brainfart but when I publish the code below, my hitTest is triggered by the entire movieclip from 0,0 to \_width, \_height and not by it’s content.[/FONT][/COLOR][/COLOR][/SIZE][/FONT]  
[FONT=Verdana][SIZE=1][COLOR=black][COLOR=black][FONT=Verdana] [/FONT][/COLOR][/COLOR][/SIZE][/FONT]  
[FONT=Verdana][SIZE=1][COLOR=black][COLOR=black][FONT=Verdana]The “fwa” movieclip contains some txt that I broke apart, and I only want the hitTest to run when the “mc” hits the txt within the “fwa” movieclip![/FONT][/COLOR][/COLOR][/SIZE][/FONT]

[AS]  
var i:Number = 0;  
var count:Number = 0;  
var colorArr = [“0x99cc33”, “0xff0066”, “0xffcc00”, “0x33ccff”];

this.onEnterFrame = function()  
{

```
mc = this.createEmptyMovieClip("mc"+i, this.getNextHighestDepth());
mc.attachMovie("circle", "circle", mc.getNextHighestDepth());
mc._x = Math.random()*Stage.width;
mc._y = Math.random()*Stage.height;
mc._xscale = mc._yscale = Math.random()*150;
mc._alpha = 20+Math.random()*80;

var my_color:Color = new Color(mc);

if(mc.hitTest(fwa))
{
    my_color.setRGB(0xFFFFFF);
}
else
{
    my_color.setRGB(colorArr[count]);
}
count++;
i++

if(count == colorArr.length){ count = 0 }

```

}

[/AS]

Hope somebody can give me a hint here 🙂  
[FONT=Verdana][SIZE=1][COLOR=black][COLOR=black][FONT=Verdana][/FONT][/COLOR][/COLOR][/SIZE][/FONT]
