# Prob w/ fadeIn/Out

**URL:** <https://forum.kirupa.com/t/prob-w-fadein-out/162851>\
**Category:** Uncategorized\
**Created:** [September 16, 2005, 8:51pm UTC](https://forum.kirupa.com/t/prob-w-fadein-out/162851 "2005-09-16T20:51:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![umojie](https://avatars.discourse-cdn.com/v4/letter/u/4af34b/32.png) [@umojie](https://forum.kirupa.com/u/umojie)\
**Post date:** [September 16, 2005, 8:51pm UTC](https://forum.kirupa.com/t/prob-w-fadein-out/162851/1 "2005-09-16T20:51:14Z")

</div>

Ok,  
I have a menu\_mc which calls the nav\_mc to takes it place, after you rollOVer the menu\_mc which then tells nav\_mc to go to frame 76 where I have this code, becuase I want the nav\_mc to fadeIn/Out. Since this is my navigation, I want to be able to call it to fadeIn everytime I rollOver the menu\_mc and fadeOut everytime I click on a different button.

```auto
nav_mc.[color=#000087]_alpha[/color] = 100;
nav_mc._fadeDirection = [color=#993300]false[/color];
nav_mc.[color=#000087]onEnterFrame[/color] = [color=#993300]function[/color]() {
	 [color=#993300]if[/color] ([color=#000087]this[/color]._fadeDirection == [color=#0000ff]false[/color]) {
		 [color=#f000f0]//-- When _fadeDirection is false
[/color] [color=#993300]if[/color] ([color=#000087]this[/color].[color=#000087]_alpha[/color]>0) {
			 [color=#000087]this[/color].[color=#000087]_alpha[/color] -= 5;
		 } [color=#993300]else[/color] {
			 [color=#000087]delete[/color] [color=#000087]this[/color].[color=#000087]onEnterFrame[/color];
			 [color=#000087]this[/color].[color=#000087]removeMovieClip[/color]();
		 }
	 } [color=#993300]else[/color] {
		 ([color=#000087]this[/color]._fadeDirection == [color=#0000ff]true[/color])
		 [color=#f000f0]//-- When _fadeDirection is true
[/color] [color=#993300]if[/color] ([color=#000087]this[/color].[color=#000087]_alpha[/color]<100) {
			 [color=#000087]this[/color].[color=#000087]_alpha[/color] += 5;
		 } [color=#993300]else[/color] {
			 [color=#000087]delete[/color] [color=#000087]this[/color].[color=#000087]onEnterFrame[/color];
			 [color=#000087]this[/color].[color=#000087]removeMovieClip[/color]();

```

I feel like theres a better way to set this up, but unsure how to approach it. Again I appreciate all HELP!
