# Scripted \_alpha fades :(

**URL:** https://forum.kirupa.com/t/scripted--alpha-fades/227979
**Category:** Uncategorized
**Created:** [June 4, 2007, 12:17pm UTC](https://forum.kirupa.com/t/scripted--alpha-fades/227979 "2007-06-04T12:17:50Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![whitelaurence](https://avatars.discourse-cdn.com/v4/letter/w/5daacb/32.png) [@whitelaurence](https://forum.kirupa.com/u/whitelaurence)
#### Post date: [June 4, 2007, 12:17pm UTC](https://forum.kirupa.com/t/scripted--alpha-fades/227979/1 "2007-06-04T12:17:50Z")

</div>

help…

ok 5 movie clip buttons (named mc\_but1 through to 5) and 5 movie clips (named mc\_1 through 5),  
when buton 1 is pressed movie clip 1 fades up and the other 4 movie clips fade out,  
when buton 2 is pressed movie clip 2 fades up and the other 4 movie clips fade out etc etc.

this is just the script for button 1

mc\_but1.onPress = function(){

{mc\_1.onEnterFrame = function ()  
{if (mc\_1.\_alpha \< 100)  
{mc\_1.\_alpha += 10;}  
else{delete this.onEnterFrame;

{mc\_2.onEnterFrame = function ()  
{if (mc\_2.\_alpha \> 0)  
{mc\_2.\_alpha -= 10;}  
else{delete this.onEnterFrame;

{mc\_3.onEnterFrame = function ()  
{if (mc\_3.\_alpha \> 0)  
{mc\_3\_alpha -= 10;}  
else{delete this.onEnterFrame;

{mc\_4.onEnterFrame = function ()  
{if (mc\_4.\_alpha \> 0)  
{mc\_4.\_alpha -= 10;}  
else{delete this.onEnterFrame;

{mc\_5.onEnterFrame = function ()  
{if (mc\_5.\_alpha \> 0)  
{mc\_5.\_alpha -= 10;}  
else{delete this.onEnterFrame;

}}  
}}  
}}}}}}}}}}}}

its clearly stupid and takes forever to do anything, please help!!!
