# Fade in with one button fade out with another

**URL:** <https://forum.kirupa.com/t/fade-in-with-one-button-fade-out-with-another/90451>\
**Category:** Uncategorized\
**Created:** [May 17, 2005, 10:29pm UTC](https://forum.kirupa.com/t/fade-in-with-one-button-fade-out-with-another/90451 "2005-05-17T22:29:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![norfy](https://avatars.discourse-cdn.com/v4/letter/n/ec9cab/32.png) [@norfy](https://forum.kirupa.com/u/norfy)\
**Post date:** [May 17, 2005, 10:29pm UTC](https://forum.kirupa.com/t/fade-in-with-one-button-fade-out-with-another/90451/1 "2005-05-17T22:29:29Z")

</div>

Hi, this is my first post as I am getting to grips with Flash at the moment.  
I have a movie clip that is loaded in the first frame and \_alpha set to 0.

I have an ‘About’ button that runs the following code to fade up this movie.

on (release) {  
\_level0.container03.onEnterFrame = function( ){  
if(\_level0.container03.\_alpha\<100){  
\_level0.container03.\_alpha +=10;  
}else{  
delete \_level0.container03.onEnterFrame;  
}  
}  
}

this seems to work fine, but then I want my ‘Home’ button to fade this movie back out. I’ve tried reversing what i’ve done above and using \_alpha -=10 but this seems not to work and the movie clip stays visible. By setting another onEnterFrame function in the ‘Home’ button, is this just activating the one in the about button, thus always fading to 100%?

Any ideas?

Many thanks

Mark
