# Fade with as / problem?

**URL:** <https://forum.kirupa.com/t/fade-with-as-problem/226129>\
**Category:** flash\
**Created:** [May 18, 2007, 11:06am UTC](https://forum.kirupa.com/t/fade-with-as-problem/226129 "2007-05-18T11:06:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![exit](https://avatars.discourse-cdn.com/v4/letter/e/e19adc/32.png) [@exit](https://forum.kirupa.com/u/exit)\
**Post date:** [May 18, 2007, 11:06am UTC](https://forum.kirupa.com/t/fade-with-as-problem/226129/1 "2007-05-18T11:06:22Z")

</div>

Hi

I have a “strange” problem with a fade function, which I hope someone here can help me solve?!

My Function looks like this:

function fadeIn() {  
mcBack.onEnterFrame = function() {  
mcBack.\_alpha += 10;  
};  
if (mcBack.\_alpha \>= 100) {  
delete mcBack.onEnterFrame;  
trace(“deleted”);  
}  
}

I want to be able to delete the function, when \_alpha is 100 - but as the function is now, I am not able get the trace(“deleted”) to work… Am I going about this in the wrong way??

Thanks in advance 🙂
