# Why don't you fade?

**URL:** https://forum.kirupa.com/t/why-dont-you-fade/117034
**Category:** Uncategorized
**Created:** [July 23, 2004, 4:30pm UTC](https://forum.kirupa.com/t/why-dont-you-fade/117034 "2004-07-23T16:30:43Z")
**Posts on this page:** 9
**Page:** 3

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 24, 2004, 2:31pm UTC](https://forum.kirupa.com/t/why-dont-you-fade/117034/41 "2004-07-24T14:31:29Z")

</div>

maybe like this

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 24, 2004, 2:41pm UTC](https://forum.kirupa.com/t/why-dont-you-fade/117034/42 "2004-07-24T14:41:55Z")

</div>

no, as you can see the main timeline has two layers, 1 layer with the menu and the other menu with the submenu (forgot to turn \_alpha to 100, so that’s why you can’t see the submenu), this submenu is called PICS. Now i’ll explain pieces of my code:

```auto

startArray*.onPress = function() {
		// so now you're in the mc you clicked
		subhide(placeold);
		// hides the previous submenu
		place = this.txt;
		// this indicates the movieclip you clicked,
		// inside the btns (btn0, btn1 etc) is txt 
		// the title of the btn (PICS, HOME etc)
		submenu(place);
		//does the function submenu, if you clicked PICS, place = PICS
		placeold = this.txt;
		// sets the mc you clicked to oldplace for the next time you click a button

```

now the function that isnt working

```auto

function submenu(loc) {
	// loc = place = mcyouclicked.txt = (PICS/HOME etc) 
	setProperty(loc, _visible, true);
	// sets the visibility of the submenu true
	loc.onEnterFrame = function() {
		// submenu.onEnterFrame
		trace("boe");
		this._alpha = this._alpha + 2;
		// lets the mc fade in from 0 to 100
		if (this._alpha>=100) {
			delete this.onEnterFrame;
			// when mc is fully visible, delete this.onEnterFrame
		}
	};
}

```

i’ll hope you do know what i mean now… i think its difficult to explain problems well ;(

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 24, 2004, 2:43pm UTC](https://forum.kirupa.com/t/why-dont-you-fade/117034/43 "2004-07-24T14:43:43Z")

</div>

No i’m sorry, because the other buttons (BIO, MAIL) will have submenu’s too, and you’ve only fixed it for pics. It want the submenu to fade in depends on the button you’ve clicked… maybe it’s to complicated…

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 24, 2004, 3:28pm UTC](https://forum.kirupa.com/t/why-dont-you-fade/117034/44 "2004-07-24T15:28:38Z")

</div>

> [@2nd day](#):
>
> No i’m sorry, because the other buttons (BIO, MAIL) will have submenu’s too, and you’ve only fixed it for pics. It want the submenu to fade in depends on the button you’ve clicked… maybe it’s to complicated…

it is getting a bit messy but you can still make it work.  
Give each submenu a seperate instance name, pics0,pics1,pics2 so we can use ivar to reference again. Just done it quickly here with 3, you`ll have to positionthem correctly

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 24, 2004, 6:46pm UTC](https://forum.kirupa.com/t/why-dont-you-fade/117034/45 "2004-07-24T18:46:09Z")

</div>

Thanks! Do you know a way to change the gap, because i want the gap to be as big as the submenu, and the submenu’s will change from size… Thanks for putting so much time in my projects! I’ve learned a lot the past days! About your script… could you tell me why you use createEmptyMovieClip? Because thats the only part i dont understand about the code…

---

<div class="post-metadata">

### Author: ![stringy](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@stringy](https://forum.kirupa.com/u/stringy)
#### Post date: [July 24, 2004, 7:08pm UTC](https://forum.kirupa.com/t/why-dont-you-fade/117034/46 "2004-07-24T19:08:52Z")

</div>

> [@2nd day](#):
>
> Thanks! Do you know a way to change the gap, because i want the gap to be as big as the submenu, and the submenu’s will change from size… Thanks for putting so much time in my projects! I’ve learned a lot the past days! About your script… could you tell me why you use createEmptyMovieClip? Because thats the only part i dont understand about the code…

created empty movieclip because it worked better for the onEnterFrame(“loc”)  
I`m pretty sure we can use the submenus_width to vary the spacing. If you get your submenus in place, i`ll have a try because i`m still not sure where they are going.

---

<div class="post-metadata">

### Author: ![2nd\_day](https://avatars.discourse-cdn.com/v4/letter/2/a4c791/32.png) [@2nd\_day](https://forum.kirupa.com/u/2nd_day)
#### Post date: [July 24, 2004, 9:21pm UTC](https://forum.kirupa.com/t/why-dont-you-fade/117034/47 "2004-07-24T21:21:36Z")

</div>

well ive placed everything at the right spot… but know the submenus stay visible… i dont get it.

---

<div class="post-metadata">

### Author: ![stringy](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@stringy](https://forum.kirupa.com/u/stringy)
#### Post date: [July 25, 2004, 6:47am UTC](https://forum.kirupa.com/t/why-dont-you-fade/117034/48 "2004-07-25T06:47:15Z")

</div>

> [@2nd day](#):
>
> well ive placed everything at the right spot… but know the submenus stay visible… i dont get it.

you have to embed font outlines when altering \_alpha of dynamic text

---

<div class="post-metadata">

### Author: ![2nd\_day](https://avatars.discourse-cdn.com/v4/letter/2/a4c791/32.png) [@2nd\_day](https://forum.kirupa.com/u/2nd_day)
#### Post date: [July 25, 2004, 11:10am UTC](https://forum.kirupa.com/t/why-dont-you-fade/117034/49 "2004-07-25T11:10:41Z")

</div>

ok i’ll try that

[Previous page](https://forum.kirupa.com/t/why-dont-you-fade/117034.md?page=2)
