# A little Help with ActionScript

**URL:** <https://forum.kirupa.com/t/a-little-help-with-actionscript/38291>\
**Category:** flash\
**Created:** [December 20, 2003, 8:09pm UTC](https://forum.kirupa.com/t/a-little-help-with-actionscript/38291 "2003-12-20T20:09:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yean](https://avatars.discourse-cdn.com/v4/letter/y/a698b9/32.png) [@Yean](https://forum.kirupa.com/u/Yean)\
**Post date:** [December 20, 2003, 8:09pm UTC](https://forum.kirupa.com/t/a-little-help-with-actionscript/38291/1 "2003-12-20T20:09:14Z")

</div>

Hello guys

I’m trying to get an AS that allows me to ease the alpha of the MC from 0 to 100…I have been trying but I get an endless loop and the MC disappears after a while.

Anyway, this is what I’m trying to do…if you guys got better Ideas please post it here…thanks a lot:

MovieClip.prototype.alphaUp = function(alpha){  
this.onEnterFrame = function(){  
this.\_alpha +=alpha/10;  
if(this.\_alpha\>alpha){  
delete this.onEnterFrame;  
}  
};  
};

this works…makes the alpha goes up but it wont stop and makes the MC disappears after a while…I want the function to stop adding more alpha…

Thanks again

```
                                                                 -=Y.P=-
```
