# Fade-tween problem

**URL:** <https://forum.kirupa.com/t/fade-tween-problem/228032>\
**Category:** flash\
**Created:** [June 4, 2007, 7:51pm UTC](https://forum.kirupa.com/t/fade-tween-problem/228032 "2007-06-04T19:51:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![michey](https://avatars.discourse-cdn.com/v4/letter/m/3d9bf3/32.png) [@michey](https://forum.kirupa.com/u/michey)\
**Post date:** [June 4, 2007, 7:51pm UTC](https://forum.kirupa.com/t/fade-tween-problem/228032/1 "2007-06-04T19:51:11Z")

</div>

Hi  
I have this functions to fade in and out attached clips.

```php
function fadeIn_M(my_InClip:MovieClip) {
 new Tween(my_InClip, "_alpha", None.easeNone, 0, 100, 1, true);
 
 
}
function fadeOut_M(my_OutClip:MovieClip) {
 new Tween(my_OutClip, "_alpha", None.easeNone, 100, 0, 0.5, true);
 fadeOut_M.onMotionFinished = function() {
   removeMovieClip(my_OutClip); 
 
 };
 
}

```

Now, while the fade-in works on rollOver, the fade-out does not on rollOut.  
What I’m missing?

```php
for (var i = 1; i<=8; i++) {
 this["btn"+i].ID = i;
 var con_M2:MovieClip;
 this["btn"+i].onRollOver = function() {
  this.gotoAndStop("over");
  var con_M2:MovieClip = _root.createEmptyMovieClip("con_M2"+this.ID, 20);
  con_M2._x = 360;
  con_M2._y = 352;
  con_M2.attachMovie("ROLL"+[this.ID], "ROLL"+[this.ID], 1);
  fadeIn_M(_root["con_M2"+[this.ID]]);
 };
 this["btn"+i].onRollOut = this["btn"+i].onReleaseOutside=function () {
  this.gotoAndStop("up");
  fadeOut_M(_this["con_M2"+[this.ID]]);
 };

```

Thanks for any help.
