# Hit area problem

**URL:** https://forum.kirupa.com/t/hit-area-problem/89664
**Category:** Uncategorized
**Created:** [May 10, 2005, 4:28pm UTC](https://forum.kirupa.com/t/hit-area-problem/89664 "2005-05-10T16:28:05Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![leiss](https://avatars.discourse-cdn.com/v4/letter/l/4bbf92/32.png) [@leiss](https://forum.kirupa.com/u/leiss)
#### Post date: [May 10, 2005, 4:28pm UTC](https://forum.kirupa.com/t/hit-area-problem/89664/1 "2005-05-10T16:28:05Z")

</div>

hei,

how can i achieve the following:

the grey rectangle should start fading in when i reach the red square (hit area), not already when you cross the edges of the grey square… this seems to be a easy one - if one knows (sofar about the status of my flash-knowledge!)

the “button” is a movieclip with three layers:  
first layer has the button-coding (see below)  
second + third layer contain the motion-tweened rectangle/square.

thanks for helping

coding in the first layer:

stop();

this.onEnterFrame = function(){  
if(rewind == true){  
prevFrame();  
}  
}

this.onRollOver = function(){  
rewind = false;  
play();  
}

this.onRollOut = function(){  
rewind = true;  
}

this.onRelease = function(){  
\_root.gotoAndPlay(34);  
}
