# Alpha Fade with Actionscript

**URL:** https://forum.kirupa.com/t/alpha-fade-with-actionscript/175088
**Category:** flash
**Created:** [January 11, 2006, 5:05pm UTC](https://forum.kirupa.com/t/alpha-fade-with-actionscript/175088 "2006-01-11T17:05:23Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Aussie01](https://avatars.discourse-cdn.com/v4/letter/a/ac91a4/32.png) [@Aussie01](https://forum.kirupa.com/u/Aussie01)
#### Post date: [January 11, 2006, 5:05pm UTC](https://forum.kirupa.com/t/alpha-fade-with-actionscript/175088/1 "2006-01-11T17:05:23Z")

</div>

Hi,

I’m using Flash 8, and I have an FLV Playback Component in a movieclip called logo\_mc. The Playback Component is loading a movie from an external source. I want this movieclip to fade out when I click a movie clip called green\_mc.

I closest I have been to getting the right code is…

```auto

green_mc.onRelease = function(){
     speed=4;
     targetAlpha=0;
     logo_mc.onEnterFrame = function(){
          alphaDifference=Math.abs(logo_mc._alpha-targetAlpha);
          if(logo_mc._alpha>targetAlpha){
               logo_mc._alpha-= alphaDifference/speed;
          } else if (logo_mc._alpha<targetAlpha){
               logo_mc._alpha+=alphaDifference/speed;
          } else if (logo_mc._alpha == targetAlpha){
               delete logo_mc.onEnterFrame
          }
     }
}

```

Is the problem that I’m trying to fade a movie clip with a component inside?
