# Help: clip won't fade out!

**URL:** https://forum.kirupa.com/t/help-clip-wont-fade-out/153516
**Category:** flash
**Created:** [July 2, 2005, 12:58am UTC](https://forum.kirupa.com/t/help-clip-wont-fade-out/153516 "2005-07-02T00:58:28Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![mikiekwoods](https://avatars.discourse-cdn.com/v4/letter/m/b5e925/32.png) [@mikiekwoods](https://forum.kirupa.com/u/mikiekwoods)
#### Post date: [July 2, 2005, 12:58am UTC](https://forum.kirupa.com/t/help-clip-wont-fade-out/153516/1 "2005-07-02T00:58:28Z")

</div>

I want my movie clip (a simple box) to fade out when the mouse isn’t near it. I put together this code myself and it doesn’t work. Keep in mind that I know near nothing about actionscript.

```auto
 
onClipEvent (mouseMove) {
 xclip = getProperty(_target,_x);
 yclip = getProperty(_target,_y);
 xcurs = _root._xmouse;
 ycurs = _root._ymouse;
 alphax = Math.abs(xclip-xcur);
 alphay = Math.abs(yclip-ycur);
 if (alphax<200) {
  if (alphay<200) {
   talphax = Math.round((200-alphax)/4);
   talphay = Math.round((200-alphay)/4);
   allalpha = talphax + talphay;
}
}
 setProperty ( _target, _alpha, allalpha);
}
 

```
