# Fadeout functions not working on onRelease

**URL:** <https://forum.kirupa.com/t/fadeout-functions-not-working-on-onrelease/276456>\
**Category:** flash\
**Created:** [November 27, 2008, 6:16pm UTC](https://forum.kirupa.com/t/fadeout-functions-not-working-on-onrelease/276456 "2008-11-27T18:16:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vcm11](https://avatars.discourse-cdn.com/v4/letter/v/9f8e36/32.png) [@vcm11](https://forum.kirupa.com/u/vcm11)\
**Post date:** [November 27, 2008, 6:16pm UTC](https://forum.kirupa.com/t/fadeout-functions-not-working-on-onrelease/276456/1 "2008-11-27T18:16:25Z")

</div>

Hi guys,

going crazy with these bloody functions and buttons, got movie in the root with buttons inside (they all fade in at beginning of main movie), the script is at main movie controlling some of the buttons from topmenubuttons movieclip.

It only executes the first line inside onrelease function if i take the second or third out then it works! i need all working…frustration!!

```auto

this.topmenubuttons_mc.theatre_mc.onRelease = function() {
	fadeOut_canvas ();
	fadeOut_rightbanner ();
	fadeOut_table ();
};

function fadeOut_canvas(){
		this.onEnterFrame=function(){
    	canvas_mc._alpha -= 5;
		if(canvas_mc._alpha<1){
			delete this.onEnterFrame
			}
    	}
	}
function fadeOut_rightbanner(){
		this.onEnterFrame=function(){
    	rightbanner_mc._alpha -= 5;
		if(rightbanner_mc._alpha<1){
			delete this.onEnterFrame
			}
    	}
	}
function fadeOut_table(){
		this.onEnterFrame=function(){
    	table_mc._alpha -= 5;
		if(table_mc._alpha<1){
			delete this.onEnterFrame
			}
    	}
	}

```
