Need some help on hitTest

Just like the picture below,i only want the codes execute if the object touches the side of the rectangle,but not the corner,how do i do that?

[QUOTE=cnboy0212;1984892]Just like the picture below,i only want the codes execute if the object touches the side of the rectangle,but not the corner,how do i do that?

[/QUOTE]

I think the easiest way would be to have arounded corner mc with _alpha = 0 on top of it and hitTest that.
Or something like this

//will have to adjust the value "15" to suit
//mc instance name mc
mindist = Math.sqrt(mc._width/2*mc._width/2+mc._height/2*mc._height/2)-15;
onEnterFrame = function () {
	dist = Math.sqrt((_xmouse-mc._x)*(_xmouse-mc._x)+(_ymouse-mc._y)*(_ymouse-mc._y));
	if (mc.hitTest(_xmouse, _ymouse) && dist<mindist) {
		trace("hit");
	}
};