# Movieclip fade in and out using setintervals

**URL:** <https://forum.kirupa.com/t/movieclip-fade-in-and-out-using-setintervals/279910>\
**Category:** flash\
**Created:** [January 20, 2009, 4:25pm UTC](https://forum.kirupa.com/t/movieclip-fade-in-and-out-using-setintervals/279910 "2009-01-20T16:25:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rawmedia](https://avatars.discourse-cdn.com/v4/letter/r/977dab/32.png) [@rawmedia](https://forum.kirupa.com/u/rawmedia)\
**Post date:** [January 20, 2009, 4:25pm UTC](https://forum.kirupa.com/t/movieclip-fade-in-and-out-using-setintervals/279910/1 "2009-01-20T16:25:18Z")

</div>

Any one help ive create a flv player, and i want the controls (controlContainer) to fade in/out when the mouse is detected out of the flv player. i know you can do this using set intervals or set timeout.

this is as far as i got, can any one help, thankyou

function checkBounds(dx, dy){

```
if (checkX(dx) || checkY(dy)){
    controlContainer._visible = false;
    } else {
 
    controlContainer._visible = true;
}

```

}

function checkX(dx) {  
var Xmax = \_root.\_width - 8;

```
if ((dx&gt;1)&&(dx&lt;Xmax)) {
    
    return false;

} else {
    
    return true;
   
}

```

}  
function checkY(dy) {  
var Ymax = \_root.\_height - 5;

```
if ((dy&gt;1)&&(dy&lt;Ymax)) {
    return false;
    
} else {
    return true;
    /
}

```

}  
\_root.onMouseMove = function() {

```
_root.checkBounds(_xmouse, _ymouse);
```
