# HELP!reallyREALLYstumped

**URL:** https://forum.kirupa.com/t/help-reallyreallystumped/19319
**Category:** flash
**Created:** [April 26, 2003, 5:32pm UTC](https://forum.kirupa.com/t/help-reallyreallystumped/19319 "2003-04-26T17:32:09Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![invisible7](https://avatars.discourse-cdn.com/v4/letter/i/779978/32.png) [@invisible7](https://forum.kirupa.com/u/invisible7)
#### Post date: [April 26, 2003, 5:32pm UTC](https://forum.kirupa.com/t/help-reallyreallystumped/19319/1 "2003-04-26T17:32:09Z")

</div>

Ok, I have a simple action where the position of the mouse causes a section of the stage to fade out or in with the use of an alpha mask inside a 2nd mc. For some reason, the fade doesn’t work. When triggered by the mouse position, the alpha just pops out or in w/o the keyframed fade. To make things more curious, if I remove the quotes from around either “fadeout” or “fadein” in the code below, the “fadeout” portion will work, but not the “fadein”. Have tried a number of purmutations of script w/ no luck. (the\_parent. stuff is because the whole movie gets loaded into a master movie.)

Any help greatly appreciated!!

this is the script on the mc containing the alpha fade.

onClipEvent (load) {  
gotoAndStop(1);  
}  
onClipEvent (enterFrame) {  
if (\_parent.\_xmouse\>660) {  
\_parent.emptyMC.gotoAndPlay(“fadeout”);  
} else if (\_parent.\_xmouse\<660) {  
\_parent.emptyMC.gotoAndPlay(“fadein”);  
}  
}

---

<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: [April 26, 2003, 5:35pm UTC](https://forum.kirupa.com/t/help-reallyreallystumped/19319/2 "2003-04-26T17:35:53Z")

</div>

you can’t change the alpha of a mask. :-\

you’d need to fade in/out whatever the mask is covering.

**edit.** sorry… i meant to say you can’t change the alpha value of a mask. 😛

---

<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: [April 26, 2003, 7:44pm UTC](https://forum.kirupa.com/t/help-reallyreallystumped/19319/3 "2003-04-26T19:44:33Z")

</div>

But the point of the mask is to have a changing alpha. Half of the operation works (fadeout), but only when fadein is not in “”. I wanted to attach an example.fla, but that option is not available in this reply form. I’ll (sorry) repost with the .fla.

---

<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: [April 26, 2003, 7:47pm UTC](https://forum.kirupa.com/t/help-reallyreallystumped/19319/4 "2003-04-26T19:47:22Z")

</div>

wait! you can attach your fla… just click here \<a href=“newreply.php?s=&action=newreply&threadid=21653”\>\<img alt=“post reply button large” src=“images/post\_reply.gif” border=“0” width=“90” height=“25”\>\</a\> 😉

---

<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: [April 26, 2003, 8:08pm UTC](https://forum.kirupa.com/t/help-reallyreallystumped/19319/5 "2003-04-26T20:08:40Z")

</div>

here it is.

---

<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: [April 26, 2003, 8:11pm UTC](https://forum.kirupa.com/t/help-reallyreallystumped/19319/6 "2003-04-26T20:11:24Z")

</div>

ehmm… the .zip is empty!? :-\

---

<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: [April 26, 2003, 8:25pm UTC](https://forum.kirupa.com/t/help-reallyreallystumped/19319/7 "2003-04-26T20:25:40Z")

</div>

Ok, that was stupid, but…

i’m going crazy!! my fla is 296k, but that’s over the max size, so i zip it and it’s 212k, but that’s still over the max size. what’s the point of attaching when you can’t attach a tiny fla. Any suggestions??

---

<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: [April 26, 2003, 8:38pm UTC](https://forum.kirupa.com/t/help-reallyreallystumped/19319/8 "2003-04-26T20:38:23Z")

</div>

yeah… remove everything that has nothing to do with this problem. :-\

---

<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: [April 26, 2003, 8:52pm UTC](https://forum.kirupa.com/t/help-reallyreallystumped/19319/9 "2003-04-26T20:52:46Z")

</div>

i did that. base size does not go below 296k. compressed stays @ 212k.

---

<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: [April 26, 2003, 8:54pm UTC](https://forum.kirupa.com/t/help-reallyreallystumped/19319/10 "2003-04-26T20:54:48Z")

</div>

then upload it to your server… 😛

---

<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: [April 26, 2003, 9:02pm UTC](https://forum.kirupa.com/t/help-reallyreallystumped/19319/11 "2003-04-26T21:02:16Z")

</div>

thanks

go here

[http://invisible7.com/example.fla](http://invisible7.com/example.fla)

---

<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: [April 26, 2003, 9:09pm UTC](https://forum.kirupa.com/t/help-reallyreallystumped/19319/12 "2003-04-26T21:09:24Z")

</div>

try this:

```auto
onClipEvent (load) {
	gotoAndStop(1);
}
onClipEvent (enterFrame) {
	if (_parent._xmouse>110 && !flag) {
		this.gotoAndPlay("fadeout");
		flag = 1;
	} else if (_parent._xmouse<110 && flag) {
		this.gotoAndPlay("fadein");
		flag = 0;
	}
}

```

😉

---

<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: [April 26, 2003, 9:13pm UTC](https://forum.kirupa.com/t/help-reallyreallystumped/19319/13 "2003-04-26T21:13:26Z")

</div>

you just really rock. It works! What’s the flag stuff??

---

<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: [April 26, 2003, 9:19pm UTC](https://forum.kirupa.com/t/help-reallyreallystumped/19319/14 "2003-04-26T21:19:01Z")

</div>

the problem was that the script executed the gotoAndPlay over and over again, that’s why it didn’t fade. i set up a variable (flag) so it only is executed once.

**!flag** checks if the variable is equal to 0 (false)  
**flag** checks if the variable is equal to 1 (true)

=)
